import sort

:p is_sorted $ sort []::((Fin 0)=>Int)
> True
:p is_sorted $ sort [9, 3, 7, 4, 6, 1, 9, 1, 9, -1, 10, 10, 100, 0]
> True

:p
  xs = [1,2,4]
  for i:(Fin 6).
    search_sorted_exact(xs, ordinal i)
> [Nothing, (Just 0), (Just 1), Nothing, (Just 2), Nothing]

'### Lexical Sorting Tests

:p "aaa" < "bbb"
> True

:p "aa" < "bbb"
> True

:p "a" < "aa"
> True

:p "aaa" > "bbb"
> False

:p "aa" > "bbb"
> False

:p "a" > "aa"
> False

:p "a" < "aa"
> True

:p ("" :: List Word8) > ("" :: List Word8)
> False

:p ("" :: List Word8) < ("" :: List Word8)
> False

:p "a" > "a"
> False

:p "a" < "a"
> False

:p "Thomas" < "Thompson"
> True

:p "Thomas" > "Thompson"
> False

:p is_sorted $ sort ["Charlie", "Alice", "Bob", "Aaron"]
> True
