Main namespace, contains utility functions, type definitions, and lazy map functions.
Public API is ->LazyMap
, ->?LazyMap
, lazy-map
, force-map
,
freeze-map
, lazy-map-dispatch
.
Main namespace, contains utility functions, type definitions, and lazy map functions. Public API is `->LazyMap`, `->?LazyMap`, `lazy-map`, `force-map`, `freeze-map`, `lazy-map-dispatch`.
(->?LazyMap map)
Behaves the same as ->LazyMap, except that if m is already a lazy map, returns it directly. This prevents the creation of a lazy map wrapping another lazy map, which (while not terribly wrong) is not the best idea.
Behaves the same as ->LazyMap, except that if m is already a lazy map, returns it directly. This prevents the creation of a lazy map wrapping another lazy map, which (while not terribly wrong) is not the best idea.
(deep-merge m1 m2)
Deep merges two lazy maps. Preserves laziness of value access.
Deep merges two lazy maps. Preserves laziness of value access.
(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 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.
(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.
(rewrite form)
Rewrites form into a lazy construct.
Rewrites form into a lazy construct.
(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.
(merge m1 m2)
Merges two lazy maps. Preserves laziness of value access.
Merges two lazy maps. Preserves laziness of value access.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close