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

Add 'partitionOn' #34

Closed
chshersh opened this issue May 30, 2020 · 0 comments · Fixed by #50
Closed

Add 'partitionOn' #34

chshersh opened this issue May 30, 2020 · 0 comments · Fixed by #50
Assignees
Labels
enhancement New feature or request

Comments

@chshersh
Copy link
Contributor

Currently, slist has the following function:

partition :: forall a. (a -> Bool) -> Slist a -> (Slist a, Slist a)

But sometimes it's desirable to change the types of lists, and the function like below can be helpful:

partitionOn :: (a -> Either b c) -> Slist a -> (Slist b, Slist c)

The name can be different 🙂 But I wanted something like this for ordinary lists so many times...

@chshersh chshersh added the enhancement New feature or request label May 30, 2020
@chshersh chshersh added this to the 0.2.0.0: Richer interface milestone Jun 19, 2020
@vrom911 vrom911 self-assigned this Mar 18, 2021
vrom911 added a commit that referenced this issue Mar 18, 2021
vrom911 added a commit that referenced this issue Mar 18, 2021
chshersh pushed a commit that referenced this issue Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants