On 12/29/2012 06:19 AM, Simen Kjaeraas wrote: > foreach (a; zip(A, B) ) { > // Use a[0] and a[1] here. > } > > There have been suggestions to better integrate tuples in the language, > so in the future zip may have all the advantages of lockstep (and vice > versa), but don't cross your fingers.
Tuples have already been integrated at least as much: :) import std.stdio; import std.range; void main() { int[] cats; int[] birds; foreach (cat, bird; zip(cats, birds)) { writeln(cat, bird); } } Ali