Liking cljdoc? Tell your friends :D

io.randomseed.lazy-map

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`.
raw docstring

->?LazyMapclj

(->?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.
sourceraw docstring

->LazyMapclj

(->LazyMap contents)

Turn a regular map into a lazy map. Any values that are delays are interpreted as values that have yet to be realized.

Turn a regular map into a lazy map. Any values that are delays
are interpreted as values that have yet to be realized.
sourceraw docstring

force-mapclj

(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.
sourceraw docstring

freeze-mapclj

(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.
sourceraw docstring

is-not-thrown?cljmacro

(is-not-thrown? e expr)

Used in clojure.test assertions because (is (not (thrown? ...))) doesn't work. See http://acidwords.com/posts/2015-07-23-fixing-negation-in-clojure-test.html

Used in clojure.test assertions because (is (not (thrown? ...)))  doesn't work. See
http://acidwords.com/posts/2015-07-23-fixing-negation-in-clojure-test.html
sourceraw docstring

lazy-mapcljmacro

(lazy-map map)

Constructs a lazy map from a literal map. None of the values are evaluated until they are accessed from the map.

Constructs a lazy map from a literal map. None of the values are
evaluated until they are accessed from the map.
sourceraw docstring

lazy-map-dispatchclj

(lazy-map-dispatch obj)

This is a dispatch function for clojure.pprint that prints lazy maps without forcing them.

This is a dispatch function for clojure.pprint that prints
lazy maps without forcing them.
sourceraw docstring

lazy-map-entryclj

(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.
sourceraw docstring

map-entryclj

(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.
sourceraw docstring

map-keysclj

(map-keys f map)

Applies f to each of the keys of a map, returning a new map.

Applies f to each of the keys of a map, returning a new map.
sourceraw docstring

map-valsclj

(map-vals f map)

Applies f to each of the values of a map, returning a new map.

Applies f to each of the values of a map, returning a new map.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close