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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -