Subject: Re: Repeated lambda variables
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/01/07
Newsgroups: comp.lang.lisp
Message-ID: <771efb$96t6r@fido.engr.sgi.com>
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