Creates a Predicate function that checks if all elements of an Array are monotonic sorted according to a Comparator.
Check if array is sorted
array
const isMonotoneSortedByNumber = isMonotone(numberComparator);const array = [1,2,3];const result = isMonotoneSortedByNumber(array);console.log(result); // true
the Predicate
the Array value type
the Comparator to use
Generated using TypeDoc
Creates a Predicate function that checks if all elements of an Array are monotonic sorted according to a Comparator.
Exmaple
Check if
arrayis sortedReturns
the Predicate