fold<W> abstract method
W
fold<W>(
- W onSuccess(
- S success
- W onFailure(
- F failure
Returns the result of onSuccess for the encapsulated value
if this instance represents Success
or the result of onError function
for the encapsulated value if it is Failure
.
Implementation
W fold<W>(
W Function(S success) onSuccess,
W Function(F failure) onFailure,
);