Skip to content

Instantly share code, notes, and snippets.

@arademaker
Created July 28, 2014 14:48
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 arademaker/292b765d908364d9e5ee to your computer and use it in GitHub Desktop.
Save arademaker/292b765d908364d9e5ee to your computer and use it in GitHub Desktop.
first example in Haskell
-- testing double without type information
double x = x + x
-- testing the first example
qsort :: Ord a => [a] -> [a]
qsort [] = []
qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment