Ticket #89 (closed defect: wontfix)

Opened 18 months ago

Last modified 16 months ago

SRFI 61: COND => with generator and guard

Reported by: cowan Owned by: alexshinn
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

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.

Change History

comment:1 Changed 16 months ago by cowan

  • Status changed from new to closed
  • Resolution set to wontfix

WG1 voted to reject this.

Note: See TracTickets for help on using tickets.