[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nested define syntax
From: |
Matthias Koeppe |
Subject: |
Re: nested define syntax |
Date: |
Thu, 01 Nov 2001 10:40:35 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (sparc-sun-solaris2.7) |
Dirk Herrmann <address@hidden> writes:
> currently, guile allows the following:
>
> guile> (define (((foo a b) c) d) #f)
> guile> foo
> #<procedure foo (a b)>
> guile> (procedure-source foo)
> (lambda (a b) (lambda (c) (lambda (d) #f)))
>
> This is non-R5RS conformant, and I wonder if anybody uses this style of
> declaration? Shouldn't we rather remove it?
This syntax is *not defined* in R5RS. Guile provides a convenient
*extension* to R5RS here. Why do you claim that supporting this
extension violates R5RS?
BTW, this technique is called "currying"; I use it extensively in my
code.
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
- Re: nested define syntax,
Matthias Koeppe <=