Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected] #80

Merged
merged 1 commit into from
Jan 8, 2018
Merged

[email protected] #80

merged 1 commit into from
Jan 8, 2018

Conversation

davidchambers
Copy link
Member

Commit message:

This commit introduces a new filter function which can operate on a value of any filterable type, replacing the circuitously derived filter and filterM functions, neither of which supported string maps (or many other filterable types).

Before:

filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a
filterM :: (Alternative m, Monad m) => (a -> Boolean, m a) -> m a

After:

filter :: Filterable f => (a -> Boolean, f a) -> f a

This commit also introduces reject, the complement of filter.

This commit introduces a new ‘filter’ function which can operate on
a value of any filterable type, replacing the circuitously derived
‘filter’ and ‘filterM’ functions, neither of which supported string
maps (or many other filterable types).

Before:

    filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a
    filterM :: (Alternative m, Monad m) => (a -> Boolean, m a) -> m a

After:

    filter :: Filterable f => (a -> Boolean, f a) -> f a

This commit also introduces ‘reject’, the complement of ‘filter’.
Copy link
Member

@gabejohnson gabejohnson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Avaq Avaq left a comment

Choose a reason for hiding this comment

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

LGTM

@davidchambers davidchambers merged commit 82250e0 into master Jan 8, 2018
@davidchambers davidchambers deleted the davidchambers/fantasy-land branch January 8, 2018 12:53
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.

3 participants