Re: Changing a value in let

2014-04-04 Thread Plínio Balduino
Ouch. Now I realized that it's exactly what happens when you do this to debug a sequential binding. (let [x 35 _ (println "x is" x) y (* 35 3) _ (println "y is" y)] ; some code ) Thank you for the elucidation. Plínio On Fri, Apr 4, 2014 at 1:36 PM, Timothy Baldridge wrote:

Re: Changing a value in let

2014-04-04 Thread Timothy Baldridge
That's correct, and often clojure compilers (like ClojureScript) many actually completely rename the variable to something else. Timothy On Fri, Apr 4, 2014 at 10:34 AM, Plínio Balduino wrote: > Thank you > > I imagined something like that. Anyway, as the second binding is shadowing > the first

Re: Changing a value in let

2014-04-04 Thread Plínio Balduino
Thank you I imagined something like that. Anyway, as the second binding is shadowing the first, there's no way to access the first value, right? Plínio On Fri, Apr 4, 2014 at 1:26 PM, Timothy Baldridge wrote: > This is not modifying the value it's creating a new scope with a new > version of x

Re: Changing a value in let

2014-04-04 Thread Timothy Baldridge
This is not modifying the value it's creating a new scope with a new version of x. The binding above is shorthand for: (let [x 3] (let [x 42] (println x)) (println x)) ;; prints: 42 3 Timothy On Fri, Apr 4, 2014 at 10:23 AM, Plínio Balduino wrote: > Hi there > > I wrote this code ex