isSorted -package:dhall

The isSorted predicate returns True if the elements of a list occur in non-descending order, equivalent to isSortedBy (<=).
Check whether a sorted list is sorted. Of course, this function should always return True. It's used mostly for testing.
Takes a list and returns True if the list is sorted in ascending order and False otherwise.

Examples

>>> isSorted ([0, 1, 2, 3, 4] :: [Int])
True
>>> isSorted ([0, 1, 2, 4, 3] :: [Int])
False
The isSortedBy function returns True iff the predicate returns true for all adjacent pairs of elements in the list.