Dear All,
I am trying to make sense of Closure by reading the book Programming Closure, 2nd Eddition.
I persistently get booed at one of the very first lines of code in the book:
(conj coll item)
The listing (rather short) is below.
May I please ask you for some hint because beginner's luck seems to have gone missing in this case.
Thanks in advance!
Milen
milen@linux-oaty:~> cd ~/Dropbox/Clojure/clojure-1.4.0/
milen@linux-oaty:~/Dropbox/Clojure/clojure-1.4.0> java -cp clojure-1.4.0.jar clojure.main
Clojure 1.4.0
user=> (conj coll item)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: coll in this context, compiling:(NO_SOURCE_PATH:1)
user=> (pst)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: coll in this context, compiling:(NO_SOURCE_PATH:1)
clojure.lang.Compiler.analyze (Compiler.java:6281)
clojure.lang.Compiler.analyze (Compiler.java:6223)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3548)
clojure.lang.Compiler.analyzeSeq (Compiler.java:6457)
clojure.lang.Compiler.analyze (Compiler.java:6262)
clojure.lang.Compiler.analyze (Compiler.java:6223)
clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:5618)
clojure.lang.Compiler$FnMethod.parse (Compiler.java:5054)
clojure.lang.Compiler$FnExpr.parse (Compiler.java:3674)
clojure.lang.Compiler.analyzeSeq (Compiler.java:6453)
clojure.lang.Compiler.analyze (Compiler.java:6262)
clojure.lang.Compiler.eval (Compiler.java:6508)
Caused by:
RuntimeException Unable to resolve symbol: coll in this context
clojure.lang.Util.runtimeException (Util.java:170)
clojure.lang.Compiler.resolveIn (Compiler.java:6766)
clojure.lang.Compiler.resolve (Compiler.java:6710)
clojure.lang.Compiler.analyzeSymbol (Compiler.java:6671)
clojure.lang.Compiler.analyze (Compiler.java:6244)
clojure.lang.Compiler.analyze (Compiler.java:6223)
nil
user=>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
For the record, I point out that its not a "bug" specifically because
you will see this many many many many times throughout the book. In
fact, pretty much any time a new function or form is introduced.
(function-name argument-1 argument-2 ... argument-n)
This is not real code meant to be pasted into the REPL and evaluated,
but rather a high level example of how a particular function works.
Hope that helps :)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en