This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 89: SRFI 61: COND => with generator and guard

2011-01-24 06:48:47
WG1 - Core
alexshinn
major
cowan
wontfix
source
closed
2010-11-15 04:51:17
defect

Currently, => clauses in cond have one argument to the left of the =>, the generator, and one to the right, the receiver (which must evaluate to a procedure). The generator is evaluated. If its value is #f, the clause is abandoned. Otherwise, the value of the generator is passed to the receiver as an argument, and its result is the result of the clause.

Under this proposal, there may be two arguments to the left of the =>, the generator and the guard (which must evaluate to a procedure). The generator is evaluated, and its value is passed to the guard. If the guard returns #f, the clause is abandoned. Otherwise, the value of the generator is passed to the receiver as an argument, and its result is the result of the clause. This allows the generator to return "falsy values" other than #f (for example, () or an EOF object), which the guard is responsible for understanding.

SRFI 61 allows the generator to pass multiple arguments to the receiver; this extension is addressed in ticket #90.

resolutionwontfix
statusnewclosed

WG1 voted to reject this.