(generator &body forms)
IEnumerable that returns a value for each
yield statement in
yield statements may be issued by functions called by
forms. Generators are
implemented as native threads.
user > (generator (yield 1) (yield 2) (yield 3)) it: #<Kiezel.GeneratorThreadContext> user > (as-vector it) it: #v(1 2 3) user > (macroexpand '(generator (yield 1) (yield 2) (yield 3))) it: (system:create-generator (lambda null (yield 1) (yield 2) (yield 3)))