Subject: | Wishlist: is_sorted and assert_sorted |
Checking a list is sorted is much faster than sorting it. Please add an is_sorted() function. Often you want to sanity check or assert that something is sorted; in that case
assert_sorted(@items)
could produce an error message like
Sequence expected to be sorted, but seen element "def" followed by element "abc"
I would also find it useful to have is_strictly_ascending() and assert_strictly_ascending(), to check for sorted with no duplicate values.