isSorted

Check if the keys of a Map are already sorted
isSorted (sort m) = True
>>> isSorted (fromList [("B",1),("A",2)])  -- Sortedness is based only on keys
False

>>> isSorted (fromList [("A",2),("B",1)])
True
>>> isSorted (fromList [2, 1])
False

>>> isSorted (fromList [1, 2])
True
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.