why D matters for Bioinformatics

Christophe Travert travert at phare.normalesup.org
Wed May 23 05:06:31 PDT 2012

"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).

More information about the Digitalmars-d mailing list