[plt-scheme] swindle: (define (values a b) (values 1 2))

From: jos koot (jos.koot at tiscali.nl)
Date: Mon Sep 12 13:05:43 EDT 2005

Hi,
The documentation for 'swindle/base.ss' says:
In addition, the following form can be used to define multiple values:
    => (define (values a b) (values 1 2))
Indeed:
(require (lib "swindle.ss" "swindle"))
(define (values a b) (values 10 20)) ; defines a and b
(define old-values values) ; values is still primitive proc values
(define (values a b) (begin (void) (old-values (+ a 100) (+ b 100)))) ; 
assigns new values to a and b
BUT:
(define (values a b) (void) (old-values (+ a 1000) (+ b 1000))) ; redefines 
proc values
I dont like this. I think (define (values <ident> ...) <expr1> <expr> ...) 
should always define/assign to var values (unless syntax define has been 
redefined). I think another syntactic form should be choosen for (define 
(values a b) (values 1 2)) if it is to define/assign vars a and b (e.g: 
define-values)
Greetings, Jos
((((lambda(x)((((((x x)x)x)x)x)x))
   (lambda(x)(lambda(y)(x(x y)))))
  (lambda(x)(write x)x))
 "PLT is great")



Posted on the users mailing list.