Andrea Fontana:

But i think "front" was "cached", but it seems not...       

The caching of map front was recently removed.


More test code:


import std.stdio, std.range, std.algorithm, std.traits, std.random;

void main() {
    5.iota.map!((_) {
        auto x = uniform(0, 10);
        write("*");
        return x;
    }).filter!(_ => true).array;
}


Prints:

**********

Bye,
bearophile

Reply via email to