// source: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or_else
auto k = 21;
auto x = Result!string.ok("foo");
assert(x.fmapOrElse!(str => str.length, e => k * 2) == 3);
auto y = Result!string.err("bar");
assert(y.fmapOrElse!(str => str.length, e => k * 2) == 42);