Skip to content

Instantly share code, notes, and snippets.

@tibbe
Created September 7, 2010 17:03
Show Gist options
  • Save tibbe/568669 to your computer and use it in GitHub Desktop.
Save tibbe/568669 to your computer and use it in GitHub Desktop.
filter :: (a -> Bool) -> [a] -> [a]
filter p = go
where
go [] = []
go (x:xs)
| p x = x : go xs
| otherwise = go xs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment