fold<R> method

R fold<R>(
  1. R onRef(
    1. String ref
    ),
  2. R on(
    1. T
    )
)

Implementation

R fold<R>(R Function(String ref) onRef, R Function(T) on) {
  if (ref != null) {
    return onRef(ref!);
  } else {
    return on(this as T);
  }
}