Fork me on GitHub

@sova merge is for maps, conj or into for vectors. For strings you just need to call str instead like this


Hey guys, I have some java code (and its corresponding tests in junit) in my clojure project. I have been trying to run the junit tests using lein but have been unsuccessful so far. lein-junit is not running any tests. Has anyone else faced this problem?


Why does conj add an element at the beginning of a vector? (conj (drop-last 2 [[3 6] [1 1] [2 3] [2 5]]) [1 3]) returns ([1 3] [3 6] [1 1]) while I expect it to return ([3 6] [1 1] [1 3] ). I also read that "The 'addition' may happen at different 'places' depending on the concrete type.". Where can I read more about this behaviour?


Is it because drop-last returns a list instead of a vector?


Yes, that’s it. conj appends to the tail of a vector, but appends to the head of a seq (which is what you get back from drop-last)


wasn't sure if that was gonna be about the function or the conference, lol

😆 4