unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* (define* (((f a) b) c) ...)
@ 2011-03-13 15:49 Dan Gildea
  2011-03-15  8:37 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Gildea @ 2011-03-13 15:49 UTC (permalink / raw)
  To: guile-user

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) 
     ...))

?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-15  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 15:49 (define* (((f a) b) c) ...) Dan Gildea
2011-03-15  8:37 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).