srfi.219
- Define higher-order lambda ¶This srfi enhances define
form to allow defining
function-returning-function compactly. It works as follows:
(define ((f a b) c d) ...) ≡ (define (f a b) (lambda (c d) ...)) ≡ (define f (lambda (a b) (lambda (c d) ...))) (define (((f a) b) c) ...) ≡ (define ((f a) b) (lambda (c) ...)) ≡ (define (f a) (lambda (b) (lambda (c) ...))) ≡ (define f (lambda (a) (lambda (b) (lambda (c) ...))))
This feature has been traditionally supported in many
implementations, including Gauche. So you can use this feature
without using srfi.193
. This module is provided for
the portable code.
Note: Gauche has two define
s: A “vanilla” define
that
works as defined in R7RS, and an “extended” define
that
supports extended lambda arguments. If you import srfi.193
,
it imports the former, hence extended lambda arguments are not available.
It’s what you need for the portable code.