sorted r l is the same as pairwise r l, preferred in the case that r is a < or ≤-like relation (transitive and antisymmetric or asymmetric)
ordered_insert a l inserts a into l at such that ordered_insert a l is sorted if l is.
insertion_sort l returns l sorted using the insertion sort algorithm.
Split l into two lists of approximately equal length.
split [1, 2, 3, 4, 5] = ([1, 3, 5], [2, 4])
Merge two sorted lists into one in linear time.
merge [1, 2, 4, 5] [0, 1, 3, 4] = [0, 1, 1, 2, 3, 4, 4, 5]
Implementation of a merge sort algorithm to sort a list.