https://issues.dlang.org/show_bug.cgi?id=8405
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from [email protected] --- Some use cases. Given a 2D array, I'd like to sort or shuffle its items seen as sequential: import std.stdio: writeln; import std.algorithm: sort; import std.range: joiner, chain; import std.random: randomShuffle; void sortAll(int[][] m) { m.joiner.sort(); // error } void shuffleAll(int[][] m) { m.joiner.randomShuffle; // error } void main() { auto m = [[10, 2], [30, 4]]; m.writeln; chain(m[0], m[1]).sort(); // OK m.sortAll; m.writeln; m.shuffleAll; m.writeln; } Is it possible and reasonable for "joiner" to return a random access range in such cases (where the input is a random access range of random access ranges, this isn't an uncommon use case because built-in arrays are very common in D code)? --
