In the given Generator example implementation, the generator strictly evaluates up until and including the first element as soon as it's deefined. For instance
(def foo (generate (println "hi") (yield 1)))
;; "hi" is printed already, before forcing foo
Now, with the proposed changes, the generator is completely lazy, including the first element.
In the given Generator example implementation, the generator strictly evaluates up until and including the first element as soon as it's deefined. For instance
Now, with the proposed changes, the generator is completely lazy, including the first element.