flatten

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

Examples

alias R = Result!(Result!int);
static assert(is(typeof(R.init.flatten()) == Result!int));

assert(R.ok(3.ok).flatten() == 3.ok);
assert(R.err("failure").flatten() == "failure".err);

Meta