home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!spool.mu.edu!umn.edu!noc.msc.net!gacvx2.gac.edu!nntp-server!max
- Newsgroups: comp.lang.scheme
- Subject: Re: Something I don't understand about bindings
- Message-ID: <MAX.92Dec16143412@Kolmogorov.gac.edu>
- From: max@Kolmogorov.gac.edu (Max Hailperin)
- Date: 16 Dec 92 14:34:12
- Reply-To: Max Hailperin <max@nic.gac.edu>
- References: <a2vogler.724431792@rzdspc23> <1gl348INNp83@news.aero.org><HANCHE.92Dec15134343@ptolemy.ams.sunysb.edu><1glic3INNq5b@news.aero.org>
- Distribution: world
- Organization: Gustavus Adolphus College, St. Peter, MN
- Nntp-Posting-Host: kolmogorov.gac.edu
- In-reply-to: doner@Aero.org's message of 15 Dec 1992 21:23:15 GMTLines: 28
- Lines: 28
-
- In article <1glic3INNq5b@news.aero.org> doner@Aero.org (John Doner) writes:
-
- ... On the other hand, his original define (again according to r4rs) is
- equivalent to
-
- (define timed-prime-test
- (lambda (n)
- (define start-time (runtime))
- (define found-prime? (prime? n))
- .
- .
- .
- ))
-
- So the sequence of expressions beginning with the inner defines is
- the body of a lambda expression. And r4rs says the expressions in
- the body of a lambda expression are to be evaluated sequentially....
-
- Ahhh..., but they *aren't* expressions. Read R4RS carefully and you
- will find that a definition is not an expression. Thus the fact that
- the body *expressions* are evaluated in order is irrelevant, and
- indeed the SICP code quoted will not necessarily work in all
- R4RS-compliant scheme implementations (though contrary to how some
- might read the previous post, a scheme implementation in which the
- code works is not thereby non-R4RS-compliant). Note, btw, that the
- code everyone has been talking about long predates R4RS, and that the
- authors specifically admitted in the instructors manual that it was a
- mistake.
-