(assoc* m k expr & kvs)Returns persistent map with delayed evaluations of the expr under the key
k. Accepts multiple key/expr pairs. Does not delay evaluation of simple
forms like constants and empty sequences.
Returns persistent map with delayed evaluations of the `expr` under the key `k`. Accepts multiple key/expr pairs. Does not delay evaluation of simple forms like constants and empty sequences.
(convert-map m)Converts any map to zizz map to allow access delayed values added explicitly.
Converts any map to zizz map to allow access delayed values added explicitly.
(delay* & body)Returns customized delay for the body to be used as zizz-map values when
the map is constructed manually.
Returns customized delay for the `body` to be used as zizz-map values when the map is constructed manually.
(init m)Returns persistent map with every not simple value expression wrapped with delayed evaluation.
For example in
(def my-map (init {:a (doto :x println)}))
the expression (doto :x println) will be evaluated only when value for :a
requested, i.e. in (get my-map :a).
The value expression is considered simple if it is not non-empty sequence. So in following case evaluation will not be delayed and initialization will be faster:
(def my-map (init {:a 1}))
Returns persistent map with every not simple value expression wrapped with
delayed evaluation.
For example in
(def my-map (init {:a (doto :x println)}))
the expression `(doto :x println)` will be evaluated only when value for `:a`
requested, i.e. in `(get my-map :a)`.
The value expression is considered simple if it is not non-empty sequence. So
in following case evaluation will not be delayed and initialization will be
faster:
(def my-map (init {:a 1}))
(merge* m1 m2)Given two maps with possibly delayed values returns merged persistent map.
Given two maps with possibly delayed values returns merged persistent map.
(update* m k f)(update* m k f x)(update* m k f x y)(update* m k f x y z)(update* m k f x y z & more)Same as clojure.core/update but with delayed application of the function f.
Same as `clojure.core/update` but with delayed application of the function `f`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |