Re: SRFI 182: ADBMAL, ALET, and ALET*
Joo ChurlSoo 11 Mar 2020 04:52 UTC
| For example:
| (define x 1)
| (define y 2)
| (define a (adbmal x y))
| (define a* (adbmal* x y))
| (define v (values x y)) error:racket
| (define v* (lambda () (values x y)))
| (define listxy (lambda (x y) (list x y)))
| (a listxy) = (1 2)
| (a* listxy) = (1 2)
| (call-with-values v listxy) error
| (call-with-values v* listxy) = (1 2)
| (receive (x y) v (list x y)) error or (1 2):gambit
| (receive (x y) v* (list x y)) error
| (receive (x y) (v*) (list x y)) = (1 2)
| (set! x 10)
| (set! y 20)
| (a listxy) = (10 20)
| (a* listxy) = (1 2)
| (call-with-values v* listxy) = (10 20)
| (receive (x y) (v*) (list x y)) = (10 20)
| (receive (x y) v (list x y)) error or (1 2):gambit
By the way, which do you think is correct, racket or gambit?
--
Joo ChurlSoo