On Wednesday, 15 June 2016 at 08:53:22 UTC, Andrea Fontana wrote:
On Wednesday, 15 June 2016 at 08:25:35 UTC, data pulverizer wrote:
I guess foreach would not copy the elements? for example:

foreach(el; slice.byElement)
                x ~= el;

But it feels wrong to be doing work pulling elements that already exists by using foreach. I feel as if I am missing something obvious but can't get it.

The question is: why you need to put them inside an array? If you can, leave them in the lazy range and work on it.

I need this to work with external libraries that only deal with one dimensional arrays.

Reply via email to