To obtain the behavior you want, put the rest parameter before the keyword parameters:
(define (outerproc #!rest r #!key a b) …)
This way, r will contain all parameters, including any keyword parameters that aren’t a or b.
Marc
On Dec 18, 2015, at 2:00 AM, Adam adam.mlmb@gmail.com wrote:
Marc,
Sometimes, it can be useful to have a procedure that splices out some key arguments and then passes on the remainder.
E.g.,
(define (outerproc #!key a b #!rest r) logics (apply innerproc r))
(define (innerproc #!key c d) ..)
Currently, doing (outerproc c: myvalue) causes runtime error "Unknown keyword argument passed to procedure".
What's the motivation for this?
Would you feel that it could be relevant to include a |declare| that would alter this behavior?
Thanks, Adam