assert(Result!int.err("failure").fmapErr!(n => 0) == 0.err); import std.algorithm: equal, map; import std.range : only; assert(Result!int.err("failure").only.map!(fmapErr!(n => 0)).equal(0.err.only));
See Implementation