or

Undocumented in source. Be warned that the author may not have intended to support it.
ref
or
(
T
E
)
(
return auto ref scope Result!(T, E) result
,
return auto ref scope Result!(T, E) other
)

Examples

auto a = Result!int.ok(3);
auto b = Result!int.err("failure");
assert(a.or(b) is a);
assert(b.or(a) is a);

a = Result!int.err("failure");
b = Result!int.err("late failure");
assert(a.or(b) is b);

a = Result!int.ok(3);
b = Result!int.ok(10);
assert(a.or(b) is a);

Meta