Skip to content

clojure.core/map

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 18 Runnable: 13
([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])

Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. Returns a transducer when no collection is provided.

Examples

by zk on
by nipra on . May have evaluation errors.
by shockbob on . May have evaluation errors.
by boxie on . May have evaluation errors.
by dansalmo on . May have evaluation errors.
by octopusgrabbus on
by bsvingen on
by ha0ck on
by sleyzerzon on
by phreed on
by ibercode on
by ibercode on
by ibercode on
by ibercode on
by sodesu99 on
by cloudbuck3t on . May have evaluation errors.
by aQuaYi on
by holtzermann17 on

Note by Howard Abrams

To create a hashmap, use the hash-map function, or the {...} sugar:

(= {:a 1 :b 2 :c 3} (hash-map :a 1 :b 2 :c 3))

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.