ndslice help.

Zz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 30 10:53:15 PST 2015


Hi,

Just playing with ndslice and I couldn't figure how to get the 
following transformations.

given.

auto slicea = sliced(iota(6), 2, 3, 1);
foreach (item; slicea)
{
    writeln(item);
}

which gives.

[[0][1][2]]
[[3][4][5]]

what transformation should i do to get the following from slicea.

[[0][2][4]]
[[1][3][5]]

[[4][2][0]]
[[5][3][1]]

Zz






More information about the Digitalmars-d-learn mailing list