Currently the contents of Stride depend on from which end we look at it:
auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns
auto col = stride(m, 4);
assert(equal(col, [1, 1, 1]));
assert(equal(retro(col), [4, 4, 4]));
the quantum behavior is to be fixed.
Comment #1 by tomeksowi — 2010-10-10T15:04:46Z
Please also see to that this passes:
auto m = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]; // 3 rows, 4 columns
auto col = stride(m[1..$], 4);
assert(equal(col, [2, 2, 2]));
assert(equal(retro(col), [2, 2, 2])); // now explodes