fn
Creates a new lambda function
(fn [params*] exp*)Description
Body
Examples
(def add (fn [a, b] (+ a b)))
(add 2 3)
;;=> 5
(map (fn [x] (* x 2)) [1, 2, 3, 4])
;;=> [2, 4, 6, 8]
Last updated
Creates a new lambda function
(fn [params*] exp*)(def add (fn [a, b] (+ a b)))
(add 2 3)
;;=> 5
(map (fn [x] (* x 2)) [1, 2, 3, 4])
;;=> [2, 4, 6, 8]
Last updated