Re: Prevent keyword argumets from appearing in the rest

2016-09-21 Thread Panicz Maciej Godek
For the record, I eventually came up with the following code: (define-module (extra define-keywords) #:use-module (ice-9 nice-9) #:use-module (extra attributes) #:replace ((define/keywords . define*))) (define-syntax define/keywords (lambda (x) (define* (required args #:optional (gath

Prevent keyword argumets from appearing in the rest

2016-09-21 Thread Panicz Maciej Godek
Hi, is there any way to prevent the defined keyword arguments from appearing in the "rest" argument list? For example, if I have a definition (define* (f #:key (a 1) (b 2) (c 3) #:allow-other-keys . rest) rest) I would like (f #:a 5 #:d 6) to return (#:d 6) rather than (#:a 5 #:d 6)