SRFI 158: Generators and Accumulators Arthur A. Gleckler 13 Aug 2017 07:38 UTC

Scheme Request for Implementation 158,
"Generators and Accumulators,"
by Shiro Kawai, John Cowan, and Thomas Gilray,
is now available for discussion.

Its draft and an archive of the ongoing discussion are
available at <https://srfi.schemers.org/srfi-158/>.

You can join the discussion of the draft by filling out the
subscription form on that page.

You can contribute a message to the discussion by sending it
to <srfi-158@srfi.schemers.org>.

John Cowan added this note about the new SRFI:

  SRFI 158 will obsolete SRFI 121 when it is finalized.  A
  few new generator procedures have been added, and a new
  concept of accumulators (the dual of generators) along
  with some possibly-useful accumulator constructors.

Here's the abstract:

  This SRFI defines utility procedures that create,
  transform, and consume generators.  A generator is simply
  a procedure with no arguments that works as a source of
  values.  Every time it is called, it yields a value.
  Generators may be finite or infinite; a finite generator
  returns an end-of-file object to indicate that it is
  exhausted.  For example, read-char, read-line, and read
  are generators that generate characters, lines, and
  objects from the current input port.  Generators provide
  lightweight laziness.

  This SRFI also defines procedures that return
  accumulators.  An accumulator is the inverse of a
  generator: it is a procedure of one argument that works as
  a sink of values.

Regards,

SRFI Editor