lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

All your examples are accepted by xloop, except "if whatever(x) until finish(y)" (I wonder what meaning it could have actually). You can write "while not finish(y) if whatever(x)", though, and it would be possible to add "" and "repeat...while..." loops; arguably, it would even make the extension more homogeneous.

Another thing you can do is collapsing for loops together. You save an indentation level, and more importantly, breaks escape both loops:

    for i=1,10 for j=1,10 if i~=j do

I plan to try a couple more stuff on this base, many of them loosely inspired by Common Lisp's loop macro.

-- Fabien.