(conj (drop-last "abcde") (last "abcde"))
returns (\e \a \b \c \d)
I am confusing. In the doc of conj, I notice
The ‘addition’ may happen at different ‘places’ depending on the concrete type.
Does it mean that for LazySeq, the place to add the new item is the head?
How can I get (\a \b \c \d \e) as the result?
This refers to the behavior of Clojure’s persistent collections that incorporate the addition in the most efficient way with respect to performance and the underlying implementation.
Vectors always add to the end of the collection:
With Lists, conj puts the item at the front of the list, as you’ve noticed:
So, yes, a LazySeq is treated like a List with respect to its concrete implementation.
There’s a number of ways, but you could easily create a vector from your LazySeq: