On Friday, 2 August 2019 at 21:44:28 UTC, Jordan Wilson wrote:
        // outputs 1 2 2 3
        z.map!(a => tuple!("number","iseven")(a, a.isEven))
         .filter!(a => a.iseven)
         .array;

I *think* what's happening here is first it calls map() first going into the filter... then it gets called again when it is being evaluated for the array.

So like basically consider if you had:

if(filter(a())
   array ~= a();


that kind of thing. I think anyway, I'm not entirely sure but it fits what I can see happening here.

but idk why it is actually doing this in the phobos implementation

Reply via email to