Function min

  • Finds the smallest value.

    Accepts either a single argument with a list of values or multiple arguments as values.

    Values are compared using naturalOrder.

    Type Parameters

    • T

    Parameters

    • values: T[]

      values to compare

    Returns T

    the smallest value

    thrown if values is empty

  • Finds the smallest value.

    Accepts either a single argument with a list of values or multiple arguments as values.

    Values are compared using naturalOrder.

    Type Parameters

    • T

    Parameters

    • first: T

      the first value to compare

    • second: T

      the first value to compare

    • Rest...rest: T[]

      any other values to compare

    Returns T

    the smallest value