It's great to hear so many useful responses/tips -- it's really
helpful for people who is leaning Clojure, especially for a beginner
like me. Thank you all! -:)

On Aug 14, 12:45 am, jaime <xiejianm...@gmail.com> wrote:
> I found an interesting function "identity" which will do nothing but
> only returns the parameter passed to it. The next minute I came up a
> question: "then what's the purpose of this function?" -- I've tried to
> figure out reasons of existence of "identity".
>
> The only reason that I can imagine is this: because we often use
> higher-order functions, these higher-order functions will accept
> functions as its parameters, in such a situation, when we want to use
> a higher-order function but don't want to pass any "real" functions to
> it, then we can use function like "identity" and "identity" here is
> just to fill the role of parameter of higher-order function.
>
> Guys, is my guess correct or not? Are there other reasons for
> identity's existence?? Are there other functions for the same purpose?
>
> Thanks,
> Jaime

-- 
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