Opened 6 years ago

Closed 6 years ago

#89 closed defect (wontfix)

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 (1)

comment:1 Changed 6 years ago by cowan

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

WG1 voted to reject this.

Note: See TracTickets for help on using tickets.