No subject

From: ()
Date: Sat Mar 24 01:50:51 EDT 2012

An example that exploits lazy evaluation is the definition of a procedure
unless

(define (unless condition usual-value exceptional-value)
  (if condition exceptional-value usual-value))

===

Huh?  For both applicative and normal order, wouldn't both
exceptional-value AND usual-value be evaluated, or not, depending on
condition?

Michael

--20cf307cff74652c9004c068136d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>From pg. 399 in SICP:</div><div><br></div><div>An example that exploit=
s lazy evaluation is the definition of a procedure unless</div><div><br></d=
iv><div>(define (unless condition usual-value exceptional-value)</div><div>

=A0 (if condition exceptional-value usual-value))</div><div><br></div><div>=
=3D=3D=3D</div><div><br></div><div>Huh? =A0For both applicative and normal =
order, wouldn&#39;t both exceptional-value AND usual-value be evaluated, or=
 not, depending on condition?</div>

<div><br></div><div>Michael</div><div><br></div><div><br></div>

--20cf307cff74652c9004c068136d--

Posted on the users mailing list.