chickadee » srfi-127 » generator->lseq

generator->lseq generatorprocedure

Returns an lseq whose elements are the values generated by generator. The exact behavior is as follows:

  • generator is invoked with no arguments to produce an object obj.
  • If obj is an end-of-file object, the empty list is returned.
  • Otherwise, a newly allocated pair whose car is obj and whose cdr is generator is returned.
(generator->lseq (make-iota-generator +inf.0 1)) ;=> (1 2 3 ...)