Skip to content

Latest commit

 

History

History
38 lines (38 loc) · 677 Bytes

File metadata and controls

38 lines (38 loc) · 677 Bytes

Leiningen

Syntax and sematic

map

#+begin_src clojure

(map #(+ 1 %) (range 3)) ; => (1 2 3)

reduce

#+begin_src clojure

(reduce (fn [new-map [key val]] (if (> val 4) (assoc new-map key val) new-map)) {} {:human 4.1 :critter 3.9}) ; => {:human 4.1}

take drop take-while drop-while

filter some

sort sort-by

concat

lazy-seqs

apply

#+begin_src clojure

(apply max (range 4)) ; => 3

partial

((partial + 3) 10)
; => 13

complement

(complement zero?)