-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Currently it seems defgen and yield are undocumented.
I tried to convert the example from plai to use actual generators, but it complains about yield from non-generator.
(defgen (gen)
(defvar n 0)
(deffun (loop)
(yield n)
(set! n (+ n 1))
(loop))
(loop))
(+ (gen) (gen) (gen))
It's not wrong, but I'm not sure the right way to use these primitives (or indeed, if they are going away)
Metadata
Metadata
Assignees
Labels
No labels