• Creates a Predicate function that checks if all elements of an Iterable are monotonic sorted according to a Comparator.

    Exmaple

    Check if iterable is monotonic sorted

    const isMonotoneSortedByNumber = isMonotone(numberComparator);
    const iterable = [1,2,3];
    const result = isMonotoneSortedByNumber(iterable);
    console.log(result); // true

    Returns

    the Predicate

    Type Parameters

    • T

      the Iterable value type

    Parameters

    Returns Predicate<[Iterable<T>]>

Generated using TypeDoc