Super-dee-duper D features
Derek Parnell
derek at psych.ward
Tue Feb 13 12:47:25 PST 2007
On Tue, 13 Feb 2007 17:39:46 +0100, Frits van Bommel wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Bill Baxter wrote:
>>> Yeh, I don't get it either. How would that help me implement merge()
>>> from merge sort for instance?
>>
>> Merge bumps the iteration in both collections conditionally. The form
>> above bumps the iteration in the two collections unconditionally, until
>> one is finished; then it continues with the other until that is finished.
>
> In other words, it doesn't :(.
I imaging that the full syntax will also include this form ...
foreach (int x, i ; coll1) (int y, j ; coll2)
{
... use i and j ...
if (somecondition)
x = ... // To set the index back or forward to some
// arbitary point in the array 'coll1'.
}
--
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell
More information about the Digitalmars-d
mailing list