Function minWith

  • Finds the smallest value using a comparator.

    Type Parameters

    • T

    Parameters

    • values: T[]

      the list of values to compare

    • comparator: Comparator<T>

      compares the values

    Returns T

    the smallest value

    thrown if values is empty