This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: argument lists
- From: Nic Ferrier <nferrier at tf1 dot tapsellferrier dot co dot uk>
- To: kawa at sources dot redhat dot com
- Date: 06 Jan 2002 21:07:14 +0000
- Subject: Re: argument lists
- References: <87vgefxljt.fsf@tf1.tapsellferrier.co.uk>
Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk> writes:
> Dybvig talks about the different forms of procedure argument list, eg:
>
> (define (x arg1 arg2 ...) ...)
>
> (define (x arg1 . arg2 arg3 ...) ...)
>
> (define (x arg1) ...)
>
> The last is supposed to take all arguments that you throw at it in a
> list.
>
> Kawa doesn't seem to support this. I have a memory that it used to.
>
> Has something changed? Or has it always been like this and I am
> mistaken?
>
> If the latter shouldn't kawa support the scheme spec?
Whoops! Sorry, I realise I am mistaken.
You can't use define like that, you have to do it with a lambda, so:
(define x (lambda arg1 ...))
for example:
(define x (lambda arg1 (car arg1)))
the syntactic difference is that arg1 is not specified as a list.
Sorry for sending a dumb message.
Nic