When mapping and filtering, the last mapped element is evaluated twice... Is it the expected behaviour?

```d
void main()
{
    import std.algorithm, std.stdio;
        
    [1,2,3,4,5].
                map!((x){
                writeln("mapping ", x);
                return x;
        }).
                filter!(x=>x>2).
                front.
                writeln();
}
```

Output
```
mapping 1
mapping 2
mapping 3
mapping 3
3

```

Reply via email to