alias R = Result!int; assert(R.err("failure").andThen!(i => R.ok(i + 3)) == "failure".err); assert(R.ok(7).andThen!(i => R.ok(i + 3)) == 10.ok);
See Implementation