- (generator ?body ...)syntax
Creates a new generator. You can use this to define your own generators.
Example:
(define (my-gen start) (generator (+ start 42)) (<- (my-gen 10)) ;=> 52
Creates a new generator. You can use this to define your own generators.
Example:
(define (my-gen start) (generator (+ start 42)) (<- (my-gen 10)) ;=> 52