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.

Source for ticket #89

cc


    

changetime

2011-01-24 06:48:47

component

WG1 - Core

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.

[http://srfi.schemers.org/srfi-61/srfi-61.html SRFI 61] allows the generator to pass multiple arguments to the receiver; this extension is addressed in ticket #90.

id

89

keywords


    

milestone


    

owner

alexshinn

priority

major

reporter

cowan

resolution

wontfix

severity


    

status

closed

summary

SRFI 61: COND => with generator and guard

time

2010-11-15 04:51:17

type

defect

Changes

Change at time 2011-01-24 06:48:47

author

cowan

field

comment

newvalue

WG1 voted to reject this.

oldvalue

1

raw-time

1295822927000000

ticket

89

time

2011-01-24 06:48:47

Change at time 2011-01-24 06:48:47

author

cowan

field

resolution

newvalue

wontfix

oldvalue


    

raw-time

1295822927000000

ticket

89

time

2011-01-24 06:48:47

Change at time 2011-01-24 06:48:47

author

cowan

field

status

newvalue

closed

oldvalue

new

raw-time

1295822927000000

ticket

89

time

2011-01-24 06:48:47