6.3.90.900
6 Partial application with keywords
(require kw-utils/partial) | package: kw-utils |
procedure
(partial f arg ... #:<kw> kw-arg ...) → procedure?
f : procedure? arg : any/c kw-arg : any/c (partial #:<kw> kw-arg ...) → procedure? kw-arg : any/c
Similar to curry, but better thought of as a generalization of
partial from rackjure. Unlike curry,
(but like the rackjure version), it does not care about function
arity, and so has much simpler behavior, so that
((partial f in-arg ...) out-arg ...) is equivalent to
(f in-arg ... out-arg ...) no matter what arity f has.
It also generalizes this idea to include keyword arguments.
Examples:
procedure
f : procedure? arg : any/c kw-arg : any/c