Skip to content

Instantly share code, notes, and snippets.

@mstahl
Created August 29, 2009 16:32
Show Gist options
  • Save mstahl/177560 to your computer and use it in GitHub Desktop.
Save mstahl/177560 to your computer and use it in GitHub Desktop.
parFilter :: (a -> Bool) -> [a] -> [a]
parFilter _ [] = []
parFilter f (x:xs) =
let px = f x
pxs = parFilter f xs
in par px $ par pxs $ case px of True -> x : pxs
False -> pxs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment