Is there any Clojure built-in function that just returns the value being passed to it? The equivalent of
(defn just-val [x] x)
?
Is there any Clojure built-in function that just returns the value being passed to it? The equivalent of
(defn just-val [x] x)
?
Yes there is the identity function: http://clojuredocs.org/clojure_core/clojure.core/identity
user=> (identity 4)
4