[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Does Lua support Lazy Evaluation?
- From: Thomas Hafner <thomas@...>
- Date: 09 Dec 2006 18:00:36 +0100
"Alex Queiroz" <asandroq@gmail.com> wrote/schrieb <54e12800612090656s11a2cb0by7fd82866d2995c45@mail.gmail.com>:
> I thought Scheme is strict as well?
It's strict by default, but it allows you to do lazy evaluation
*explicitly* by using ``delay'' and ``force''. You can deal with
infinite streams (e.g. stream of all prime numbers), see
<http://srfi.schemers.org/srfi-40/srfi-40.html> or the simplier
streams of the book SICP.
Just translate that to Lua, and you can do the same.
Regards
Thomas