Re: Trouble understanding let

2010-10-10 Thread Abraham
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 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 t

Re: Trouble understanding let

2010-10-10 Thread Ulises
>> 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

Re: Trouble understanding let

2010-10-09 Thread Michael Glaesemann
On Oct 10, 2010, at 0:01 , Andreas Kostler wrote: > From "Programming Clojure", Chapter 2 - Bindings: > "The bindings are then in effect for exprs, and the value of the let > is the value of the last expression in exprs." > To me this reads: > user=> (let [k (+ 2 2)]) > 4 > > However, repl says

Re: Trouble understanding let

2010-10-09 Thread Mike Meyer
"Andreas Kostler" wrote: >From "Programming Clojure", Chapter 2 - Bindings: >"The bindings are then in effect for exprs, and the value of the let >is the value of the last expression in exprs." >To me this reads: >user=> (let [k (+ 2 2)]) > 4 > >However, repl says: >user=> (let [k (+ 2 2)]) >

Trouble understanding let

2010-10-09 Thread Andreas Kostler
>From "Programming Clojure", Chapter 2 - Bindings: "The bindings are then in effect for exprs, and the value of the let is the value of the last expression in exprs." To me this reads: user=> (let [k (+ 2 2)]) 4 However, repl says: user=> (let [k (+ 2 2)]) nil What is it I get wrong? Thanks