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