Skip to content

Conversation

garyb
Copy link
Member

@garyb garyb commented May 22, 2014

No description provided.

@@ -218,6 +219,9 @@ foreign import map
mapMaybe :: forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe f = concatMap (maybe [] singleton <<< f)

catMaybes :: forall a. [Maybe a] -> [a]
catMaybes = concatMap (maybe [] singleton)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe I should just do mapMaybe id?

paf31 added a commit that referenced this pull request May 22, 2014
@paf31 paf31 merged commit 9772fb2 into master May 22, 2014
@paf31 paf31 deleted the cat-maybes branch May 22, 2014 20:59
@paf31
Copy link
Contributor

paf31 commented May 22, 2014

Looks good thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants