unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Dan Gildea <gildea@cs.rochester.edu>
To: guile-user@gnu.org
Subject: (define* (((f a) b) c) ...)
Date: Sun, 13 Mar 2011 11:49:26 -0400	[thread overview]
Message-ID: <20110313154926.GA14534@e15.cs.rochester.edu> (raw)

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	other threads:[~2011-03-13 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13 15:49 Dan Gildea [this message]
2011-03-15  8:37 ` (define* (((f a) b) c) ...) Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110313154926.GA14534@e15.cs.rochester.edu \
    --to=gildea@cs.rochester.edu \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).