macro | since v0.0-927 | clojure.core/lazy-seq | Edit |
(lazy-seq & body)
Returns a new lazy sequence.
Takes a body of expressions that returns an ISeq or nil, and yields a ISeqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls.
(core/defmacro lazy-seq
[& body]
`(new cljs.core/LazySeq nil (fn [] ~@body) nil nil))