I am curious why the first argument to apply (and also reduce) affects the function’s behavior as shown in the following 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
applyorreducemodifying the behaviour ofconj.conjitself is polymorphic. It adds the elements in the most efficient way of the given data structure.