fold<Z> method

  1. @override
Z fold<Z>(
  1. Z onLeft(
    1. L
    ),
  2. Z onRight(
    1. R
    )
)
override

Applies onLeft if this is a Left or onRight if this is a Right

Implementation

@override
Z fold<Z>(Z Function(L) onLeft, Z Function(R) onRight) => onLeft(_value);