fold<T> abstract method

T fold<T>(
  1. T onFailure(
    1. L l,
    2. StackTrace? s
    ),
  2. T onSuccess(
    1. R r
    )
)

Folds the Either into a single value.

If this is a Failure, the onFailure function is called with the value. If this is a Success, the onSuccess function is called with the value.

Implementation

T fold<T>(T Function(L l, StackTrace? s) onFailure, T Function(R r) onSuccess);