For Development HEAD DRAFTSearch (procedure/syntax/module):

11.55 srfi.219 - Define higher-order lambda

Module: srfi.219

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 defines: 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.



For Development HEAD DRAFTSearch (procedure/syntax/module):
DRAFT