On 12 February 2015 at 02:06, gvim <gvi...@gmail.com> wrote:
>
> That explains it but I think Clojure's syntax is misleading here. Without
> knowledge of this magic the mind doesn't readily translate:
>
> (let [x 1
>         x (inc x)
>         x (inc x)
>         x (inc x)]
>    x)
>
> .... into:
>
> (let [x 1]
>   (let [x (inc x)]
>     (let [x (inc x)]
>       (let [x (inc x)]
>   x))))
>

It's not magic; it's just how the syntax is defined. The for and doseq
forms have the same behaviour.

Languages like Racket that are perhaps more focused on teaching do have
separate let and let* forms. However, Clojure has a more practical focus,
and there isn't much practical point in having a non-shadowing let.

- James

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to