On Sunday, 29 January 2017 at 23:48:40 UTC, Jordan Wilson wrote:

You need to do something like this:
auto arrMap = arr.filter!(x => x > 5).map!(x => x^^2).array;

It's because arrMap is lazy evaluated.


So does it mean that I cannot assign FilterResult and MapResult to a variable and safely use it later, because underlying array may change meanwhile? Since I am dealing with large arrays, I thought I'd save some memory by not calling .array on MapResult.

Reply via email to