Liking cljdoc? Tell your friends :D

strojure.zizzmap.core


assoc*clj/smacro

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

initclj/smacro

(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}))
sourceraw docstring

merge*clj/s

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

update*clj/s

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

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close