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.



Reply via email to