argument lists

Per Bothner per@bothner.com
Fri Dec 20 10:36:00 GMT 2002


Nic Ferrier wrote:

>  (define (x arg1 . arg2 arg3 ...) ...)


This is not valid reader syntax, let a alone define syntax.
A dotted list must have a single item after the dot, so you could
have (define (foo x y . z) (list x y z))

This works in Kawa, thought it appears to not be in R5RS.

> for example:
> 
>   (define x (lambda arg1 (car arg1)))


You can do:  (define (x . arg1) (car arg1))
This is supported by R5RS and Kawa.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/



More information about the Kawa mailing list