mapErr<W extends Object> method

  1. @override
Ok<S, W> mapErr<W extends Object>(
  1. W fn(
    1. F error
    )
)
override

Returns a new Result, mapping any Err value using the given transformation.

Implementation

@override
@pragma("vm:prefer-inline")
Ok<S, W> mapErr<W extends Object>(W Function(F error) fn) {
  return Ok<S, W>(ok);
}