:: [Bool] -> Bool package:list-predicate

O(n). Whether the elements are all equal.
>>> allEqual [1..]
False

>>> allEqual [3, 3, 3, 3]
True

>>> allEqual []
True

>>> allEqual [1]
True
O(n). Whether all adjacent pairs of elements are different. Useful for determining whether a sorted list is all unique.
>>> allAdjUnique [1, 2, 3, 2]
True

>>> allAdjUnique [1, 2, 2, 3]
False

>>> allAdjUnique []
True

>>> allAdjUnique [1]
True
O(n). Whether the input is a palindrome, i.e., the same forwards and backwards.
>>> palindrome "rotor"
True

>>> palindrome "rover"
False

>>> palindrome ""
True

>>> palindrome "a"
True
O(n). Whether the elements are in sorted order.
>>> sorted [1, 2, 3, 3]
True

>>> sorted [1, 2, 3, 2]
False

>>> sorted []
True

>>> sorted [1]
True
O(n log(n)). Whether the elements are all unique.
>>> allUnique [1, 2, 5, 7]
True

>>> allUnique [1, 2, 5, 2]
False

>>> allUnique []
True

>>> allUnique [1]
True
O(n). Whether the list is increasing sequentially (one-by-one).
>>> ascSequential [1, 2, 3, 4, 5]
True

>>> ascSequential [1, 2, 3, 4, 8]
False

>>> ascSequential ([] :: [Int])
True

>>> ascSequential [1]
True
O(n). Whether the list is descending sequentially (one-by-one).
>>> descSequential [5, 4, 3, 2, 1]
True

>>> descSequential [5, 4, 3, 3, 1]
False

>>> descSequential ([] :: [Int])
True

>>> descSequential [1]
True