when<T> method
Return the result in one of these functions.
if the result is an Left, it will be returned in onLeft
,
if it is a Right it will be returned in onRight
.
Implementation
@override
T when<T>({
required WhenCallback<T, L> onLeft,
required WhenCallback<T, R> onRight,
}) =>
onLeft(value);