[gambit-list] (define ((...) ...)

Eduardo Cavazos wayo.cavazos at gmail.com
Tue Aug 25 19:50:09 EDT 2009


Michele Zaffalon wrote:

> Now, what doesn't (define ((L-free-particle mass) local) ... work with
> Gambit? What is missing?

You can create a new version of 'define' which behaves that way:

(define-syntax define*
   (syntax-rules ()
     ((_ ((x . f1) . f2) . b)
      (define* (x . f1)
        (lambda f2 . b)))
     ((_ . r)
      (define . r))))

The SICM text should have an explanation of this particular notation.

Thanks to Derick Eddington for the definition.

Ed



More information about the Gambit-list mailing list