Subject: Re: Scope of the name of a named let; bugs in SRFI 5 and scm
From: (Rob Warnock)
Date: 1999/07/06
Newsgroups: comp.lang.scheme
Message-ID: <7lsfh1$>
Allegro Petrofsky  <Allegro@Petrofsky.Berkeley.CA.US> wrote:
|   (let ((f -)) (let f ((n (f 1))) n)) => -1
| However, in scm and guile this evaluates to 1.  Kawa gets it right.
| I didn't try any other implementations.

MzScheme, Elk, & Scsh (Scheme48) get it wrong, too, but Gambit and RScheme
get it right.

Note that even the ones that get it wrong when written as a named-let
work correctly if you write out the R[45]RS expansion manually:

	(let ((f -))
	  ((letrec ((f (lambda (n) n)))
	   (f 1)))  ==>  -1


Rob Warnock, 8L-855
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA