[Oz] Help: Lazy evaluation ..
Denys Duchier
Denys.Duchier at ps.uni-sb.de
Thu Jul 29 17:48:00 CEST 1999
ravi at konark.ncst.ernet.in (P Ravi Prakash) writes:
> I want to use the lazy evaluation feature of Oz.
There is no lazy evaluation in Oz2, but there is in Mozart (Oz3) which
you can download from http://www.mozart-oz.org/. There is even
convenient syntax for defining `lazy' functions. Here is your example
using this new syntax:
declare fun lazy {Gen N} N|{Gen N+1} end
declare K = {Gen 1}
{Browse {Nth K 3}}
More generally {ByNeed F} returns a `future' which is lazily computed
by invoking {F} when needed.
Sincerely,
--
Dr. Denys Duchier Denys.Duchier at ps.uni-sb.de
Forschungsbereich Programmiersysteme (Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45 http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50 Phone: +49 681 302 5618
66041 Saarbruecken, Germany Fax: +49 681 302 5615
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-users
mailing list