On Wednesday, 29 January 2014 at 22:25:45 UTC, inout wrote:
int value(int xs[]...) { int result = 0; foreach (i; xs) { result += 10 * result + i; } return result; }unittest { static assert(value(1, 2) == 21); } AndreiThis allocates memory
no
On Wednesday, 29 January 2014 at 22:25:45 UTC, inout wrote:
int value(int xs[]...) { int result = 0; foreach (i; xs) { result += 10 * result + i; } return result; }unittest { static assert(value(1, 2) == 21); } AndreiThis allocates memory
no