I think my misconception was not the missing identiy fun but rather that the 
first element in the list is the function 
that is evaluated.
so #(%) is trying to evaluate whatever % evaluates to, e.g. (1) and therefore 
there is the
java.lang.ClassCastException: java.lang.Integer cannot be cast to 
clojure.lang.IFn

that also happens with #((+ % 1))

But you're right, identity helps there as well.
#(identity (+ % 1)) works :)

Thanks

Michael

P.S.
What about the second question? Is there some place one can get feedback to 
functional code samples of a learner?


Am 18.04.2009 14:14 Uhr, schrieb Laurent PETIT:
> (map identity (list 1 2 3))


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