[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Does Lua support Lazy Evaluation?
- From: Thomas Hafner <thomas@...>
- Date: 09 Dec 2006 18:00:36 +0100
"Alex Queiroz" <email@example.com> wrote/schrieb <firstname.lastname@example.org>:
> 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.