Day 8 of #100DaysOfClojure
I solved 2 prolems on 4clojure today. I’m happy that I am making progress and learning some new functions. Today I used get for the first time.
Solutions
Intro to some was pretty straightforward. Drop every nth item was more challenging. Looking back there was probably a way to solve this using the nth function but I used indexed-map in mine
#(map
(fn [x] (get x 1))
(filter
(fn [x] (not= (mod (get x 0) %2) 0))
(map-indexed (fn [idx itm] [(+ idx 1) itm]) %1)
)
)