fold<U, F> method

  1. @override
Result<U, F> fold<U, F>(
  1. U ok(
    1. T
    ),
  2. F err(
    1. E
    )
)
override

Invoke either the ok or the err function based on the result.

This is a combination of the map() and mapErr() functions.

Implementation

@override
Result<U, F> fold<U, F>(U Function(T) ok, F Function(E) err) =>
    Err(err(_err));