🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6730

Re: Lazy Evaluation... a simple example

#6730
From: Dave Jones
Date: Fri, 16 Feb 1990 00:31
17 lines
1258 bytes
From article <7476@mentor.cc.purdue.edu>, by ksb@mentor.cc.purdue.edu (Kevin Braunsdorf):

...
> 
> What I did was much simpler than most of the systems I saw described at
> the time.  I simply made `cons' defer evaluation of its arguments until
> either `car' or `cdr' was called on the resulting CONSBOX (which was
> tagged as being LAZY, and had a saved environment hung on it).

Just for the record, what you did is not full lazy evaluation. But
as I noted earlier, defering the evaluation of a CONS is probably
the most important 'lazy deferal' for practical purposes.

There's a book that explains an implementation of lazy evaluation
pretty well, called _Functional Programming, Application and Implementation_,
by Peter Henderson, Prentice-Hall 1980. I don't know if it's still in
print or not.
Technical Details
Message-ID: <12037@goofy.megatest.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!decwrl!megatest!djones
References: <7476@mentor.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!decwrl!megatest!djones
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.lang.misc
Subject: Re: Lazy Evaluation... a simple example
Message-ID: <12037@goofy.megatest.UUCP>
Date: 16 Feb 90 00:31:38 GMT
References: <7476@mentor.cc.purdue.edu>
Organization: Megatest Corporation, San Jose, Ca
Lines: 17