Hi,

or a maybe clearer example, which shows the different states:

; No Var, yet.
user=> (var foo)
java.lang.Exception: Unable to resolve var: foo in this context
(NO_SOURCE_FILE:1)

; Var is now defined. Hence it can be resolved. But it has to root
value, ie. it is "unbound", yet.
user=> (def foo)
#'user/foo
user=> (var foo)
#'user/foo
user=> foo
java.lang.IllegalStateException: Var user/foo is unbound.
(NO_SOURCE_FILE:0)

; Finally provide a value (either via def or as in this case
temporarily with binding)
user=> (binding [foo 5] foo)
5

Hope, that helps.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to