Last active
August 29, 2015 14:18
-
-
Save StoneCypher/55563649ee1e698a451b to your computer and use it in GitHub Desktop.
whoops forgot to set the highlighting language
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
| qs( [] ) -> % this says "quicksort when called with an empty list" | |
| []; | |
| qs( [FirstItem | ListRemainder] ) -> | |
| SmallerThanFirst = fun(X) -> X < FirstItem end, | |
| {Smaller, LargerOrEq} = lists:partition(SmallerThanFirst, ListRemainder), | |
| qs(Smaller) ++ [FirstItem] ++ qs(Larger). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment