in the declaration of RandomSample it only checks for isInputRange, but in the implementation it calls the .save() method which is only available in forward ranges.

as a result this code does not compile:

void main()
{
        auto a = File("test.d", "r").byLine();
        auto s = randomSample(a,1,5);
        writeln(s);
}

Is this a bug or I missed something?

Reply via email to