Re: keyword arguments and #:rest

2012-11-12 Thread Panicz Maciej Godek
Bonjour! 2012/11/10 Ludovic Courtès : > Hi, >> So I thought that maybe there could be another keyword controlling whether >> the keywords are left in the rest list or not, so the above code could >> look like this: >> >> (define* (random-array #:key (range 1.0) (type #t) (mean 0) #:rest >> dims #:

Re: keyword arguments and #:rest

2012-11-10 Thread Ludovic Courtès
Hi, Panicz Maciej Godek skribis: > So I thought that maybe there could be another keyword controlling whether > the keywords are left in the rest list or not, so the above code could > look like this: > > (define* (random-array #:key (range 1.0) (type #t) (mean 0) #:rest > dims #:no-key) > (ar

keyword arguments and #:rest

2012-11-10 Thread Panicz Maciej Godek
Hello, I've been writing a function to generate an array of random numbers. I wanted it to optionally allow specifying the array type (and a few other things) using keyword arguments. I eventually came up with the following code: (define remove-keyword-args (letrec ((self (lambda(list)