[r6rs-discuss] "Unspecified"

From: Paul Schlie <schlie>
Date: Tue Oct 3 19:56:40 2006

Per Bothner wrote:
> A more fundamental question is:
> (- (values 1 2)). It could be:
> (2) "spliced" yielding (- 1 2) --> -1

and (let* ([z (values 1 2)]
           [(x y) z])
          (+ x y z)) => 6

enabling multiple value use to be truly elegant and generally useful.

---
thereby for the sake of argument, all expressions denoted as arguments
are evaluated with their returned values formulating the true arguments,
where expressions returning an unspecified value are ignored, although
may be alternatively explicitly directed to return an alternate value:
(? <expr> [<opt-value>]) :: if <expr> = unspecified value
                                 returns #t or <opt-value>
                            else returns <expr> value.
(define x (if #f 0))
(define y (values 2 3))
(+ x y) :: (+ 2 3)
(+ (? x 1) y) :: (+ 1 2 3)
Received on Tue Oct 03 2006 - 19:55:32 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC