I just grepped the clojure source code and an interesting use is in walk.clj

https://github.com/clojure/clojure/blob/master/src/clj/clojure/walk.clj#L62

`walk` has flexibility with higher order functions, but identity helps with
the simple
case of just returning the forms elegantly.

I thought it was cool :)

Ambrose

On Sat, May 7, 2011 at 11:51 PM, Base <basselh...@gmail.com> wrote:

> At the risk of sounding completely dense, I am having a hard time
> understanding the purpose of the Identity function.  As far as I can
> tell all it does is return what is passed to it.
>
> Review code I see it used all the time, and cannot understand why it
> is needed.
>
> Any insight?
>
> Thanks
>
> Base
>
> --
> 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 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