[plt-scheme] passing-on keyword arguments
Eli Barzilay wrote:
> (define outer
> (make-keyword-procedure
> (lambda (kws vals . args)
> (+ (keyword-apply inner kws vals args) 5))))
>
> I think that I know how to make it easier, allowing something like
> this:
>
> (define (outer args ...)
> (+ (inner args ...) 5))
>
> to do the same, but it'll take some work to implement.
OTOH you loose all the information on what are the arguments to both
inner and outer. Sooner than you think you got those Python *args,
**kwargs functions all over the place and runtime/editor documentation &
reflection are worth nothing.
--
regards,
Jakub Piotr Cłapa