int result; chainMap!(n => n+1)(chainMap!(n => n * 2)((int n) { result = n; return false; }))(2); assert(result == 6);
See Implementation