chickadee » srfi-135 » generator->text

generator->text gen #!optional maxprocedure

Returns a text of the characters produced by gen, in order. If max is provided and is an exact natural number, then at most max values will be read from gen. Otherwise, reading continues until gen returns EOF.

Example:

(let ((gen (list->generator '(#\a #\b #\c #\d))))
  (generator->text gen))
  ⇒ «abcd»