This is an attempt to produce similar behavior as seen in the sorted( ) function in Python. Supporting only one of the three optional arguments. The key - Specifies a function of one argument that is used to extract a comparison key from each list element
2 people like thisPosted: 13 years ago by Cameron Frederick
Sort a list by a frequency distribution. Frequency is calculated as per a a provided function. In the test case a list of lists is sorted by the frequency of the length of the lists.
1 people like thisPosted: 11 years ago by Muigai
An tail recursive implementation of insertion sort on list
0 people like thisPosted: 2 years ago by tathanhdinh
Functional quicksort inspired by the Haskell Quick Sort at http://www.haskell.org/haskellwiki/Introduction. Since F# lists aren't lazy, uses sequences instead of lists to be haskell like. Roughly O(n) if you Seq.take 1, full on QS if you enumerate the whole thing.
3 people like thisPosted: 13 years ago by Tony Lee
Sort strings as file managers usually do, treating numeric substrings as numbers.
3 people like thisPosted: 5 years ago by Jim Foye
Sort collection of items based on criteria of closest distance between consecutive items. The resulting collection first element is one of two farthest items, the end element is the second of the farthest pair. For the collection of `n` items the distance function is called n*(n-1) /2 times. The distance for pair of items is assumed to not depend on items order.
2 people like thisPosted: 1 year ago by Konstantin Sh