I tried to use an anonymous function in map but it didn't work.

user=> (map #(%) '(1 2 3))
java.lang.ClassCastException: java.lang.Integer cannot be cast to 
clojure.lang.IFn

but with a normal anonymous function it works as expected:

user=> (map (fn [x] x) '(1 2 3))
(1 2 3)

Thanks
Michael

P.S. As I'm quite fresh to FP and clojure - is there some place where one can 
show / upload code examples and get some 
hints / help for improving them?

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