map<T> method

T map<T>(
  1. T f1(
    1. T1
    ),
  2. T f2(
    1. T2
    )
)

Implementation

T map<T>(T Function(T1) f1, T Function(T2) f2) {
  return _which == 1 ? f1(_t1 as T1) : f2(_t2 as T2);
}