merge_sort uses a merge sorting algorithm to produce a sorted
list from the input given a pairwise comparison function.
insertion_sort uses a merge sorting algorithm to produce a
sorted list given a pairwise comparison function.
1 2 3 4 | merge_sort(v, lt = `<`, bail_depth = 50, bail_size = 20,
bail_func = insertion_sort)
insertion_sort(v, lt = `<`)
|
v |
list of objects to sort. |
lt |
function accepting two arguments and returning a logical – whether the first argument is less than the second (e.g. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.