user=> (identity 4) 4
user=> (filter identity [1 2 3 nil 4 false true 1234]) (1 2 3 4 true 1234)
user=> (map #(%1 %2) (cycle [inc identity]) [1 2 3 4 5 6 7 8 9 10]) (2 2 4 4 6 6 8 8 10 10)
user=> (partition-by identity (sort "abcdaabccc")) ((\a \a \a) (\b \b) (\c \c \c \c) (\d))
user=> (map first (partition-by identity [1 1 2 3 3 1 1 5 5])) (1 2 3 1 5)
user=> (group-by identity "abracadabra") {\a [\a \a \a \a \a], \b [\b \b], \r [\r \r], \c [\c], \d [\d]}
Returns true if x is nil, false otherwise.
(defn identity "Returns its argument." {:added "1.0" :static true} [x] x)
Comments top
No comments for identity. Log in to add a comment.