min2<T> function

T min2<T>(
  1. T a,
  2. T b, [
  3. Comparator<T> comparator = compareNaturalOrder
])

Implementation

T min2<T>(
  T a,
  T b, [
  Comparator<T> comparator = compareNaturalOrder,
]) =>
    comparator(a, b) < 0 ? a : b;