Fork me on GitHub
#beginners
<
2018-12-26
>
seancorfield04:12:32

@sova merge is for maps, conj or into for vectors. For strings you just need to call str instead like this https://clojurians.slack.com/archives/C053AK3F9/p1545767292241800

anirudh06:12:27

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?

nikola11:12:36

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?

nikola11:12:05

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

manutter5112:12:41

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)

jaawerth19:12:00

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

😆 4