Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created October 18, 2009 05:29
Show Gist options
  • Save abuiles/212558 to your computer and use it in GitHub Desktop.
Save abuiles/212558 to your computer and use it in GitHub Desktop.
qs (x:xs) = filter (\x -> x < xs) xs ++ x ++ (filter (\x -> x > xs))
Point Free
qs = ap (liftM2 (++) (filter =<< flip (<)) . (. (filter . flip (>))) . (++) . head) tail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment