--- Comment #2 from 2012-06-05 13:45:11 PDT ---
(In reply to comment #1)
> Sorry, but I *do* use the index variable:

I didn't said that index variable is never useful and never used. I have said
its need is rare, in my experience of using Python and in my experience of
looking at Haskell code.

On the other hand I have shown and offered 3 different ways to solve the
problem without lockstep. lockstep is redundant, and its usage doesn't shorten
a significant amount of code: there are redundant operations that are way more
commonly useful than lockstep, like amap/afilter.


Of the 3 alternative solution, using enumerate, those:

foreach (index, button, ref hwndButton; lockstep(buttons, hwndButtons))

foreach (index, myMsg; lockstep(iota(0, min(cLines, cyClient / cyChar - 1)),


foreach (index, button, ref hwndButton; enumerate(zip(buttons, hwndButtons)))

foreach (index, myMsg; enumerate(zip(iota(min(cLines, cyClient / cyChar - 1)),

Or maybe:

foreach (index, button, ref hwndButton;

foreach (index, myMsg; min(cLines, cyClient / cyChar -

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to