"bearophile" , dans le message (digitalmars.D:168206), a écrit :
>> Besides that, it is easy to emulate your example with a little
>> library solution. Maybe something like that should be added to
>> std.range.
> 
> What syntax do you suggest?

foreach (immutable sx, sy; unpack(s)) {...}

doing something like (but more optimised than):

foreach (immutable sx, sy; lockstep(s.map!"a[0]", s.map!"a[1]")) {...}

You have to be careful with types, I don't think the result of map here 
can be cast to immutable (but I didn't check).

Reply via email to