Skip to content

Instantly share code, notes, and snippets.


ooooak/To study

Created Feb 8, 2020
What would you like to do?
Learning the "vocabulary" ( partion-all, interpose, nthnext, nthrest, take-nth...)
def rabbits
[{:name "Fluffy" :color :white :size :large}
{:name "Chocolate" :color :brown :size :medium}
{:name "Hopkins" :color :black :size :medium}])
(def get-medium-bunny-names ; defines a transformation on a process
(filter #(= (:size %) :medium)) ; note the arity of these two
(map :name)))
(into [] get-medium-bunny-names rabbits) ; produces ["Chocolate" "Hopkins"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment