k is not global binding so it does not resolve
let helps to define local binding

thanks
Abraham

On Oct 10, 2:09 pm, Ulises <ulises.cerv...@gmail.com> wrote:
> >> What is it I get wrong?
>
> As the others said, you have no expressions being evaluated in the
> body of let and hence you get nil. The way I understand let is that
> you define some bindings to be used in the body of let which will
> cease to exist (if they didn't exist before the let expression) after
> the whole let expression (new bindings and expressions in the body)
> have been evaluated.
>
> So:
>
> user => k ; doesn't exist
> Unable to resolve symbol: k in this context
>
> user => (let [k 2] (+ k 1)) ; 3 since k has been bound to 2 in let
> 3
>
> user => k ; still doesn't exist
> Unable to resolve symbol: k in this context
>
> U

-- 
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