firstOr method

T firstOr(
  1. T orElse
)

Returns the first element, or orElse if the set is empty.

Implementation

T firstOr(T orElse) => isEmpty ? orElse : first;