[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nested define syntax
From: |
Marius Vollmer |
Subject: |
Re: nested define syntax |
Date: |
10 Nov 2001 14:05:08 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Dirk Herrmann <address@hidden> writes:
> > Does anybody even _use_ that whacked feature? I can't imagine what it
> > would be useful for! I mean, cripes.
>
> It surprised me that someone knew about it at all - I found it when
> looking through the implementation of 'define'.
I just browsed thru "Structure and Interpretation of Classical
Mechanics" by Sussman and Wisdom, and they use it, too. They have a
very short introduction to Scheme in an appendix, and they explain
this currying feature even tho they don't explain rest arguments. So
it must be somewhat important to them.
Specifically, their example is
(define ((compose f g) x)
(f (g x)))
((compose square sin) 2)
.826821810431806
which is surely very elegant.