https://issues.dlang.org/show_bug.cgi?id=12811
--- Comment #2 from [email protected] --- (In reply to Kenji Hara from comment #1) > 'filter' will lazily evaluate the given array outside of the 'spam' > function, so the lambda 'i => bar(i)' needs to capture 'this' variable to > call member function 'bar'. > > It will make a closure allocation. Thank you for the answer. We'll have to add some escape analysis to turn some closure heap allocations into stack allocations. --
