On Feb 10, 2009, at 11:09 PM, Mark Volkmann wrote:

Just checking my understanding of the rules for writing anonymous functions ...
(fn [args] ...) allows any number of expressions in its body.
#(...) only allows a single expression in its body, correct?
Why the difference?

Because a single expression is an important and large subset of all useful anonymous functions and typing something like:

        #(* % 4)

is significantly more convenient than typing:

         #((* % 4))

which would be required if #(...) supported multiple expressions.

--Steve

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

Reply via email to