fmapErr

Undocumented in source.
template fmapErr(alias pred)
fmapErr
(
T
E
)
(
auto ref scope Result!(T, E) result
)

Members

Functions

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

Examples

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));

Meta