On Sunday, 16 August 2015 at 11:53:42 UTC, FreeSlave wrote:
Let's say I want to map some range using some context. The obvious way is to do:uint[3] arr = [1,2,3]; uint context = 2;auto r = arr[].map!(delegate(value) { return value * context; });
To me the obvious way is to use a lambda, not a delegate: uint[3] arr = [1,2,3]; uint context = 2; auto r = arr[].map!(value => value * context);