Why randomAccessRange.array() before calling sort? The std.algorithm.sort doc says: "Sorts a random-access range ..."
import std.algorithm, std.array;
long[] source = [2, 0, 1];
auto mapped = source.map!("a * 10");
assert (isRandomAccessRange!(typeof(mapped))); // Passes.
Implies possibility
// to to use
std.algorithm.sort?
auto mappedThenSorted = mapped.sort(); // Errorauto mappedThenSorted = mapped.array.sort(); // Works (and used in examples)
What am I missing in the documentation?
