Created
August 26, 2012 08:04
-
-
Save smallgeek/3475989 to your computer and use it in GitHub Desktop.
NaturalSpec_Tutorial_6_3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// クイックソートの単純な実装 – 真似しないように | |
| let rec quicksort = function | |
| | [] -> [] | |
| | pivot :: rest -> | |
| let small,big = List.partition ((>) pivot) rest | |
| quicksort small @ [pivot] @ quicksort big | |
| let QuickSort x = | |
| printMethod "" | |
| quicksort x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment