[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(define* (((f a) b) c) ...)

From: Dan Gildea
Subject: (define* (((f a) b) c) ...)
Date: Sun, 13 Mar 2011 11:49:26 -0400

In guile 2.0, I need to use "define*" to define second-order functions
such as:

(define* ((f a) b) ...)

But define* doesn't work for higher-order functions, or for more
complicated definitions of second-order functions, such as:

(define* (((f a) b) c) ...)

(define* ((f #:optional a) b) ...)

These forms are very common in the scmutils mechanics functions.
Is there any way around this, other than using lambda, as in:

(define* ((f a) b) (lambda (c) ...))

(define* (f #:optional a) (lambda (b) ...))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]