map<E2> method
Maps the error type of this cause
Implementation
Cause<E2> map<E2>(E2 Function(E) f) {
return switch (this) {
Fail(:final error) => Fail(f(error)),
Die() as Die => this as Cause<E2>,
};
}
Maps the error type of this cause
Cause<E2> map<E2>(E2 Function(E) f) {
return switch (this) {
Fail(:final error) => Fail(f(error)),
Die() as Die => this as Cause<E2>,
};
}