[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: call logic
- From: Klaus Ripke <paul-lua@...>
- Date: Tue, 23 Aug 2005 23:22:37 +0200
On Tue, Aug 23, 2005 at 02:06:18PM -0700, Brent Arias wrote:
> Ok, yes, I figured that was what was happening. However, I don't understand
> why. What inspired Lua, fortunately, to not evaluate the perm{"a", "b",
> "c"} expression over and over again?
it's just the definition of for .. in
look at, say, java:
i = thecollection.iterator();
while (i.hasNext()) { ...
// they have a syntax construct for this, nowadays, don't they?
anyway: you would not call thecollection.iterator() over and over,
but rather the one iterator you got for this job.
you would note make much progress otherwise :)
cheers