Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Pascal J. Bourguignon <pjb <at> informatimago.com>
Subject: Re: Compress a sequence of ends
Newsgroups: gmane.comp.lang.lua.general
Date: Friday 22nd July 2011 00:21:54 UTC (over 6 years ago)
David Manura  writes:

> On Thu, Jul 21, 2011 at 4:04 AM, Dirk Laurie  wrote:
>> On the other hand, if a loop and a conditional, or nested loops,
>> have the same body, I write as a habit
>>    for i=1,n  if x[i]~=0
>>        -- (body)
>>        end end
>
> I also commonly do things like
>
> for k=1, 10 do
> for j=1, 10 do
> for i=1, 10 do
>   f(i, j, k)
> end end end
>
> Replacing `end end end` with `ennnd` or (preferably) `end3` is not
> going to gain much. 

I've got an idea.  Let's use a single character, instead of a keyword
here.

(for k=1, 10 do
 (for j=1, 10 do
  (for i=1, 10 do
    f(i, j, k)
    )))



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.
 
CD: 3ms