fold<T> abstract method

T fold<T>(
  1. T ifLeft(
    1. L
    ),
  2. T ifRight(
    1. R
    )
)

Applies either ifLeft or ifRight depending on the instance.

Implementation

T fold<T>(T Function(L) ifLeft, T Function(R) ifRight);