On Monday, 20 July 2015 at 14:59:21 UTC, John Colvin wrote:
On Monday, 20 July 2015 at 14:40:59 UTC, jmh530 wrote:[...]Everything is exactly as I would expect. Lambdas with => are just shorthand that skips the return expression and std.algorithm.each just calls the lambda for each element in x, it doesn't say anything about copying the result back in to x.x.map!(a => a * a).copy(x);
But the lambda takes a ref parameter...