Hi,

Am 18.04.2009 um 14:32 schrieb Michael Hunger:

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

#(%) is equivalent to (fn [x] (x)). So giving an integer as argument
will basically to call an integer => *BOOM*. As you correctly noted.

#((+ % 1)) will be transformed to (fn [x] ((+ x 1))) and again you
will be trying to call an integer, because (+ x 1) is integer if x is
one.

Your problem are actually the double parens! #(+ % 1) is equivalent
to (fn [x] (+ x 1)) and will work as you expect.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to