Safe uses of multiple values
|Reported by:||cowan||Owned by:||cowan|
|Component:||WG1 - Core||Keywords:|
Description (last modified by cowan)
Currently, uses of values where the values are discarded anyway is illegal, but all the usual Schemes except SCM and SSCM accept them (I tested with begin). Should we go with something close to the R6RS wording?
"The continuations of all non-final expressions within a sequence of expressions, such as in lambda, begin, let, let*, letrec, letrec*, case, and cond forms, take an arbitrary number of values."
The definition of begin would need to change too:
(define-syntax begin (syntax-rules () ((begin exp) exp) ((begin exp1 exp2 ...) (call-with-values (lambda () exp1) (lambda args (begin exp2 ...))))))
Change History (5)
comment:4 Changed 6 years ago by cowan
- Owner changed from alexshinn to cowan
- Status changed from decided to writing