ClojureDocs

Nav

Namespaces

val

clojure.core

Available since 1.0 (source)
  • (val e)
Returns the value in the map entry.
4 Examples
;; emulate 'vals'
(map val {:a 1 :b 2})
;;=> (1 2)
(val (first {:one :two}))
;;=> :two
;syntactic sugar for (val)
(:doc (meta #'meta))
;; extracts the key of a map entry
(val (clojure.lang.MapEntry. :a :b))
;;=> :b
See Also

Returns a sequence of the map's values, in the same order as (seq map).

Added by mmwaikar

Returns the key of the map entry.

Added by Dimagog

Returns a sequence of the map's keys, in the same order as (seq map).

Added by Dimagog
1 Note
    By , created 12.7 years ago, updated 12.6 years ago

    This is my first attempt at using this site to gain an understanding of a closure function. Two of the examples above seem incorrect.

    Example 3(?) seems to have nothing to do with val

    (notice the lack of example identifiers)