So it seems that (lambda ( . rest) ...) wants to mean
(lambda rest ...)
That would be definitely better.
Bert
Quoting Reinhold Kainhofer <reinh...@kainhofer.com>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Sonntag, 21. Dezember 2008 03:18:48 schrieb Bertalan Fodor:
Hi,
I found this in lilypond-book-preamble.ly:
(lambda ( . rest)
Besides that I can't imagine what that wants to mean, the GUILE doc
clearly says:
--- syntax: *lambda* formals body
|(|variable1| ... |variablen| . |variablen+1|)|
There must be at least one argument before the period.
It seems clear that GUILE accept that strange form. But not any of my
Java-based parsers.
Neither GUILE nor MIT-Scheme are documented to allow this form of optional
parameters (actually, both disallow it explicitly in the docs).
Wouldn't it be better to re-write the code to
#(define toplevel-book-handler
(lambda rest
(set! output-empty-score-list #f)
(apply print-book-with-defaults rest)))
(i.e. name the whole parameter expression rest instead of ( . rest ) and pass
that on)? I've not tested this, though, so I might be completely wrong, but
from the GUILE doc it seems that this does exactly the same as the
undocumented ( . rest) and is documented to work.
Cheers,
Reinhold
What would you suggest to do with that?
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinh...@kainhofer.com, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
* K Desktop Environment, http://www.kde.org, KOrganizer maintainer
* Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFJTa2yTqjEwhXvPN0RAviRAJ0eRgUlrOg3j7VRpIJfHERKcVKLhQCgje78
ao+TesZTPTXyVWbtgAmvofA=
=MWPM
-----END PGP SIGNATURE-----
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel