macro | since v0.0-927 | clojure.core/delay | Edit |
(delay & body)
Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls.
(core/defmacro delay
[& body]
`(new cljs.core/Delay (fn [] ~@body) nil))