Hi,

fn does additional stuff which let doesn't. fn returns an object which you
can store and later call invoke on it. This is more than let promises. From
the implementation point, fn creates java class. This is not needed for let.

JW


On Mon, Jan 20, 2014 at 9:38 PM, Andy Smith <the4thamig...@googlemail.com>wrote:

> Hi,
>
> (let bindings form) is a special form. As I understand it, let can be
> reformulated in terms of functions e.g.
>
>  (let [x 2] (* x 20)) equivalent to ((fn [x] (* x 20)) 2)
> (let [x 3 y (* x x)] (- y x)) equivalent to ((fn [x] ((fn [x y] (- y x)) x
> (* x x))) 3)
>
> So if we can always reformulate in this was, why cant let be implemented
> as a macro rather than a special form?
>
> Where have I gone wrong in my understanding here?
>
> Andy
>
> --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.

Reply via email to