fold<TR> method

TR fold<TR>(
  1. TR leftF(
    1. L l
    ),
  2. TR rightF(
    1. R r
    )
)

Estrae il tipo contenuto da Either (L o R) e chiama la funzione corrispondente che dovranno essere passate come closures

Implementation

TR fold<TR>(TR Function(L l) leftF, TR Function(R r) rightF) =>
  isLeft ? leftF(_left!) : rightF(_right!);