This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: argument lists


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]