On Monday, 20 July 2015 at 15:08:16 UTC, Nicholas Wilson wrote:
But the lambda takes a ref parameter...
Yes, but it never writes to it: x.each!((ref a) => a + 1); Instead, this should work: x.each!((ref a) => a = a + 1); ... as a short-hand for: x.each!((ref a) { a = a + 1; });