I'm new to clojure, and I've seen anonymous functions written like:
(fn [x] (* x x))
and also like:
#(* % %)
Obviously, the second is more concise. Is there any relevant difference? Can every anonymous function be represented in either style? Is one more idiomatic?
Related to this question, I was unable to determine how to convert (fn [x] [x x])
to the latter syntax. I would appreciate a pointer to documentation that clarifies this situation.