Skip to content

Instantly share code, notes, and snippets.

@lucch
Created March 1, 2018 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucch/edc62d7ba9b487cb8b524b07bc306513 to your computer and use it in GitHub Desktop.
Save lucch/edc62d7ba9b487cb8b524b07bc306513 to your computer and use it in GitHub Desktop.
Quicksort in two Haskell lines
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