Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!lfcs!db From: db@lfcs.ed.ac.uk (Dave Berry) Newsgroups: comp.lang.misc Subject: Re: Lazy Evaluation... a simple example Message-ID: <2434@castle.ed.ac.uk> Date: 22 Feb 90 14:20:43 GMT References: <7476@mentor.cc.purdue.edu> <12037@goofy.megatest.UUCP> Reply-To: db@lfcs.ed.ac.uk (Dave Berry) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 27 The best explanation I've read of evaluation orders is in Field and Harrison's book "Functional Programming", pp. 118-130. Their summary defines lazy evaluation as: Normal-Order Reduction to Weak-Head Normal Form + Sharing + Lazy Constructors or, equivalently Call By Need + Lazy Constructors They point out that other combinations are possible, such as Hope+, which uses Applicative-Order Reduction and Lazy Constructors, Othis book is a very good introduction to the different kinds of functional languages around and the different methods of implementing them. It also discusses Type Inference and Program Transformation. I'd recommend it (even though it resolutely ignores ML throughout). It's published by Addison-Wesley, ISBN 0-201-19249-7 Dave Berry, LFCS, Edinburgh Uni. db%lfcs.ed.ac.uk@nsfnet-relay.ac.uk "The thought of someone sharing one's own preferences without also sharing one's aversions strikes most people as utterly inconceivable." - C. A. Tripp.