Create lazy-maps, whose values are only calculated when they are
looked up for the first time, see lazy-map
Create lazy-maps, whose values are only calculated when they are looked up for the first time, see [[lazy-map]]
Hold a value.
Hold a value.
(getv a)
Return object, resolving it if delayed.
Return object, resolving it if delayed.
(lazy-map m)
Return a LazyMap created from a map m
.
The values in m
are only evaluated when accessed.
user> (def my-map
(lazy-map
{:cause (do (println "Getting Cause")
:major-failure)
:name (do (println "Getting Name")
"Some Name")}))
#'user/my-map
user> (:name my-map)
Getting Name
"Some Name"
user> (:name my-map)
"Some Name"
Return a LazyMap created from a map `m`. The values in `m` are only evaluated when accessed. ```clojure user> (def my-map (lazy-map {:cause (do (println "Getting Cause") :major-failure) :name (do (println "Getting Name") "Some Name")})) #'user/my-map user> (:name my-map) Getting Name "Some Name" user> (:name my-map) "Some Name" ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close