I have a List of Map, I need to get the even/odd indexed elements from that list in Clojure. I don't want to iterate thought the list with for loop. Is there any small or single_word function?
user=> (take-nth 2 [0 1 2 3 4 5 6 7 8 9])
(0 2 4 6 8)
user=> (take-nth 2 (rest [0 1 2 3 4 5 6 7 8 9]))
(1 3 5 7 9)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With