Skip to content

Instantly share code, notes, and snippets.

@dsernst
Created June 8, 2015 03:30
Show Gist options
  • Select an option

  • Save dsernst/9f203700583b0f281551 to your computer and use it in GitHub Desktop.

Select an option

Save dsernst/9f203700583b0f281551 to your computer and use it in GitHub Desktop.
@nsluss shows me how to compile my first Haskell program
qs :: (Ord a) => [a] -> [a]
qs [] = []
qs (x:xs) = qs (lessThan x xs) ++ [x] ++ qs (greaterThan x xs)
where lessThan val ys = [y | y <- ys, val >= y]
greaterThan val ys = [y | y <- ys, val < y]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment