fold<T> method
Executes the provided functions based on the result's state.
If the result is an error, onError is called with the error value.
If the result is a success, onSuccess is called with the success value.
Implementation
@override
T fold<T>(T Function(Failure l) onError, T Function(TSuccess r) onSuccess) {
return onError(_value);
}