Created
July 28, 2014 14:48
-
-
Save arademaker/292b765d908364d9e5ee to your computer and use it in GitHub Desktop.
first example in Haskell
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
-- 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