Stupid little iota of an idea
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sat Feb 12 18:10:41 PST 2011
This would make more sense as a comparison:
auto iot1 = [iota(0, 10, 2), iota(0, 10, 3)];
auto iot2 = [2 : iota(0, 10, 2), 3 : iota(0, 10, 3)];
auto syn1 = [[0..10 : 2], [0..10 : 3]];
auto syn2 = [2: [0..10 : 2], 3: [0..10 : 3]];
// iot1 == [[0, 2, 4, 6, 8], [0, 3, 6, 9]]
// iot2 == 2:[0, 2, 4, 6, 8] 3:[0, 3, 6, 9]
assert(iot1 == syn1);
assert(iot2 == syn2);
More information about the Digitalmars-d
mailing list