D idom for removing array elements
albert-j via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 29 16:06:24 PST 2017
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.
More information about the Digitalmars-d-learn
mailing list