Scheme Request for Implementation 189,
"Maybe and Either: optional container types,"
by John Cowan (text), Wolfgang Corcoran-Mathe (sample implementation),
has gone into final status.

The document and an archive of the discussion are available at

Here's the abstract:

This SRFI defines two disjoint immutable container types known as Maybe and Either, both of which can contain objects collectively known as their payload. A Maybe object is either a Just object or the unique object Nothing (which has no payload); an Either object is either a Right object or a Left object. Maybe represents the concept of optional values; Either represents the concept of values which are either correct (Right) or errors (Left). Note that the terms Maybe, Just, Nothing, Either, Right, and Left are capitalized in this SRFI so as not to be confused with their ordinary use as English words. Thus "returns Nothing" means "returns the unique Nothing object"; "returns nothing" could be interpreted as "returns no values" or "returns an unspecified value".

Here is the commit summary since the most recent draft:

Here are the diffs since the most recent draft:

Many thanks to John and to everyone who contributed to the discussion of this SRFI.


SRFI Editor