(delay & body)
Returns customized delay for the body
to be used as zmap values when the
map is constructed manually.
Returns customized delay for the `body` to be used as zmap values when the map is constructed manually.
(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 new value.
Same as `clojure.core/update` but with delayed new value.
(with-map [ident zmap :as bindings] & body)
The macro binds unwrapped zmap
to ident
, then wraps result of the body
back to zmap. Useful to minimize overhead of multiple transformations over
existing zmap.
Example:
(zmap/with-map [m (zmap/wrap {})]
;; work with non-wrapped map here
(println "Inside:" (class m))
(assoc m :a (zmap/delay 1)))
;Inside: clojure.lang.PersistentArrayMap
;=> {:a 1}
The macro binds unwrapped `zmap` to `ident`, then wraps result of the `body` back to zmap. Useful to minimize overhead of multiple transformations over existing zmap. Example: (zmap/with-map [m (zmap/wrap {})] ;; work with non-wrapped map here (println "Inside:" (class m)) (assoc m :a (zmap/delay 1))) ;Inside: clojure.lang.PersistentArrayMap ;=> {:a 1}
(wrap m)
Wraps map with zmap proxy interface which provides direct access to delayed
values. If m
is zmap then returns it intact.
Wraps map with zmap proxy interface which provides direct access to delayed values. If `m` is zmap then returns it intact.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close