On Jun 4, 2009, at 5:56 PM, Max Suica wrote:
But (-> x identity) => (identity x) => x, so what our friend ozzi suggest sounds pretty on the level. If (identity x) is not equivalent to evaluating x, then, well, that's not the identity function :)
You're correct that the result would be the same.Meikel's point was that if we want to change the macro -> such that (- > x) is a legal expression whose value is x, it's slightly better (by saving one function call at runtime) for its expansion to be:
x rather than (identity x) (defmacro -> "Threads..." ([x] x) ([x form] (if (seq? form) `(~(first form) ~x ~@(next form)) (list form x))) ([x form & more] `(-> (-> ~x ~form) ~...@more))) --Steve
smime.p7s
Description: S/MIME cryptographic signature