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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With