>From where or how did you start you REPL? I copied you source into c:
\sqrs.clj and started a REPL:
C:\>clojure
Clojure 1.1.0
user=> (load-file "sqrs.clj")
#'user/square-of-sum
user=> (square-of-sum (range 10))
2025
user=>
Clojure can't find your file in the classpath.
Matt
--
You received th
On 26 Feb 2010, at 02:21, Glen Rubin wrote:
Here is the code I wrote, sqrs.clj:
(use '[clojure.contrib.generic.math-functions :only (sqr)])
(defn square-of-sum [coll]
"adds up collection of numbers and then squares it"
(sqr (reduce + coll)))
A different point: if you can
On Feb 25, 2010, at 8:21 PM, Glen Rubin wrote:
> whenever I try (load-file sqrs.clj) i get a no source file exception.
Does (load-file "sqrs.clj") work?
--Steve
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to c