On Wednesday, 11 March 2020 at 06:12:55 UTC, 9il wrote:
On Wednesday, 11 March 2020 at 00:24:13 UTC, jmh530 wrote:
[...]

Almost the same, just fixed import for `each` and a bit polished

/+dub.sdl:
dependency "mir-algorithm" version="~>3.7.18"
+/
import mir.ndslice;
import mir.ndslice.sorting;
import mir.algorithm.iteration: each;

void main() {
    auto m = [[1, -1, 3, 2],
              [0, -2, 3, 1]].fuse;
    m.byDim!0.each!sort;

    import std.stdio;
    m.byDim!0.each!writeln;
}

Great, thanks guys!

Reply via email to