Created
March 1, 2018 20:03
-
-
Save lucch/edc62d7ba9b487cb8b524b07bc306513 to your computer and use it in GitHub Desktop.
Quicksort in two Haskell lines
This file contains 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
quicksort [] = [] | |
quicksort (x:xs) = | |
quicksort [y | y <- xs, y <= x] ++ [x] ++ quicksort [z | z <- xs, z > x] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment