Liking cljdoc? Tell your friends :D

strojure.zmap.core


delayclj/smacro

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

updateclj/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 new value.

Same as `clojure.core/update` but with delayed new value.
sourceraw docstring

with-mapclj/smacro

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

wrapclj/s

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

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

× close