andThenErr<W extends Object> method

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

/ If Err, Returns a new Result by passing the Err value to the provided function.

Implementation

@override
Ok<S, W> andThenErr<W extends Object>(
  Result<S, W> Function(F error) fn,
) {
  return Ok<S, W>(ok);
}