Function boilDownTo

Go through a list of items, starting with the first item, and comparing with the second. Keep the one you want then compare that to the next item in the list with the same

const greatest = () => boil(numbers, (a, b) => a > b)
  • Type Parameters

    • T

    Parameters

    • array: readonly T[]
    • compareFunc: ((a: T, b: T) => T)
        • (a, b): T
        • Parameters

          Returns T

    Returns null | T