David Gadbois <gadbois@lagavulin.cyc.com> wrote:
+---------------
| Is ((LAMBA (FOO FOO) FOO) 1 2) legal ANS Common Lisp?
+---------------
FWIW (probably not much!), I thought I'd run it by a bunch of
Schemes, too, Scheme being so much about the Lambda Calculus and all: ;-}
These gave no error, and produced "1" as an answer:
SIOD
SCM
libscheme
SEL
RScheme
These gave no error, and produced "2" as an answer (as CLISP does):
TinyScheme
MiniScheme
Phantom
HPP
Scheme->C (the interpreter, might the compiler do better?)
Scsh [the Scheme Shell, based on Scheme-48]
These gave error messages (as CMUCL does):
Elk:
lambda: foo: duplicate variable binding
MzScheme:
let: multiple bindings of "foo" in: (#%let ((foo 1) (foo 2)) foo)
Gambit:
*** ERROR IN [compilation] -- Duplicate parameter in parameter list
(lambda (foo foo) foo)
Fools' Lisp:
Incorrect formal parameter redefinition of foo
-Rob
-----
Rob Warnock, 8L-855 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
2011 N. Shoreline Blvd. FAX: 650-964-0811
Mountain View, CA 94043 PP-ASEL-IA