Maps that only realize their values when the value is accessed.
Maps that only realize their values when the value is accessed.
(backport-seqable? x)
Equivalent to clojure 1.9's seqable?
Equivalent to clojure 1.9's seqable?
(deep-merge & maps)
Deep merges maps. Preserves laziness of unrealized values in lazy maps.
Deep merges maps. Preserves laziness of unrealized values in lazy maps.
(filter-keys pred m)
Filters the map according to a predicate of the keys.
Filters the map according to a predicate of the keys.
(fmap m f & args)
Applies a function to a map. If it's a lazy map it unwraps it, applies the function, then wraps it up again.
Applies a function to a map. If it's a lazy map it unwraps it, applies the function, then wraps it up again.
(force-map map)
Realizes all the values in a lazy map, returning a regular map.
Realizes all the values in a lazy map, returning a regular map.
(freeze-map val map)
Replace all the unrealized values in a lazy map with placeholders, returning a regular map. No matter what is done to the returned map, the values in the original map will not be forced. v can be an object to use for all the values or a function of the key.
Replace all the unrealized values in a lazy map with placeholders, returning a regular map. No matter what is done to the returned map, the values in the original map will not be forced. v can be an object to use for all the values or a function of the key.
(lazy-map)
(lazy-map m)
Constructs a lazy map from a map that may contain delays for values.
Constructs a lazy map from a map that may contain delays for values.
(lazy-map-entry k v)
Construct a lazy map entry with the given key and value. If you want to take advantage of the laziness, the value should be a delay.
Construct a lazy map entry with the given key and value. If you want to take advantage of the laziness, the value should be a delay.
(lazy-map-entry? e)
Is e a lazy map entry?
Is e a lazy map entry?
(rewrite form)
Rewrites form into a lazy construct.
Rewrites form into a lazy construct.
(literal->lazy-map form)
Constructs a lazy map from a literal map. None of the values are evaluated until they are accessed from the map. Recursively converts any nested inline maps as well.
Constructs a lazy map from a literal map. None of the values are evaluated until they are accessed from the map. Recursively converts any nested inline maps as well.
(map-entry k v)
Creates a map entry (as returned by calling seq on a map) with the given key and value.
Creates a map entry (as returned by calling seq on a map) with the given key and value.
(map-keys f m)
Applies f to every key in m. Preserves laziness of values in m.
Applies f to every key in m. Preserves laziness of values in m.
(map-vals f m)
Stages applying f to every val in m without realizing any.
Stages applying f to every val in m without realizing any.
(merge & maps)
Merges maps. Preserves laziness of unrealized values in lazy maps.
Merges maps. Preserves laziness of unrealized values in lazy maps.
(realized-at? m k)
Returns false if accessing k in m would cause a delay to execute.
Returns false if accessing k in m would cause a delay to execute.
(remove-keys pred m)
Removes the map entries that match a predicate of the keys.
Removes the map entries that match a predicate of the keys.
(select-keys m keyseq)
Same as clojure.core/select-keys but doesn't realize lazy values.
Same as clojure.core/select-keys but doesn't realize lazy values.
(unwrap m)
If m is a lazy map, it returns it in unwrapped form. Else, returns m.
If m is a lazy map, it returns it in unwrapped form. Else, returns m.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close