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 88: SRFI 87: => in CASE

2012-10-05 06:38:42
WG1 - Core
alexshinn
major
cowan
fixed
source
closed
2010-11-15 04:40:37
defect

Should we allow => in case clauses (including the else clause)? This allows you to pass the item actually matched to a procedure, analogous to the use of => in cond clauses, which passes the non-#f value to a procedure.

Example (from SRFI 87):

(case (get-symbol) ((true) #t) ((false) #f) (else => (lambda (x) x)))

This maps true to #t, false to #f, and leaves everything else alone.

resolutionfixed
statusnewclosed

WG1 voted to accept this.

resolutionfixed
statusclosedreopened
owneralexshinn
statusreopenedassigned
statusassigneddecided
owneralexshinn
statusdecidedwriting
resolutionfixed
statuswritingclosed