Skip to content

Instantly share code, notes, and snippets.

@corburn
Last active December 11, 2015 18:17
Show Gist options
  • Save corburn/b57d405150ff40f76296 to your computer and use it in GitHub Desktop.
Save corburn/b57d405150ff40f76296 to your computer and use it in GitHub Desktop.
-- http://www.thedotpost.com/2015/11/francesc-campoy-flores-functional-go
-- https://youtu.be/ouyHp2nJl0I?t=85
quicksort [] = []
quicksort (x:xs) =
let smaller = quicksort [a | a <- xs, a <= x]
bigger = quicksort [a | a <- xs, a > x]
in smaller ++ [x] ++ bigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment