fold<B> method

  1. @override
B fold<B>(
  1. B ifLeft(
    1. L left
    ),
  2. B ifRight(
    1. R right
    )
)
override

Applies ifRight to the contained value and returns its result.

Since this is a Right, ifLeft is ignored.

Implementation

@override
B fold<B>(B Function(L left) ifLeft, B Function(R right) ifRight) {
  return ifRight(value);
}