Taking pipeline processing to the next level

Jerry via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 6 05:55:00 PDT 2016


On Monday, 5 September 2016 at 05:08:53 UTC, Manu wrote:
> I mostly code like this now:
>   data.map!(x => transform(x)).copy(output);

So you basicly want to make the lazy computation eager and store 
the result?

data.map!(x => transform(x)).array

Will allocate a new array and fill it with the result of map.
And if you want to recycle the buffer I guess writing a buffer 
function would be trivial.





More information about the Digitalmars-d mailing list