reduce - Why does Clojure's apply treat vectors differently from lists? -
reduce - Why does Clojure's apply treat vectors differently from lists? -
i curious why first argument apply (and reduce) affects function's behavior shown in next code snippet.
user=> (apply conj '() [1 2 3]) (3 2 1) user=> (apply conj [] [1 2 3]) [1 2 3] user=> (apply conj '() '(1 2 3)) (3 2 1) user=> (apply conj [] '(1 2 3)) [1 2 3]
it's not apply
or reduce
modifying behaviour of conj
. conj
polymorphic. adds elements in efficient way of given info structure.
clojure reduce apply
Comments
Post a Comment