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 guarded combinator #203

Closed
chshersh opened this issue Oct 4, 2019 · 3 comments · Fixed by #207
Closed

Add guarded combinator #203

chshersh opened this issue Oct 4, 2019 · 3 comments · Fixed by #207
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ new Bring something new into library (add function or type or interface)

Comments

@chshersh
Copy link
Contributor

chshersh commented Oct 4, 2019

After some time I find myself needing it several times. So let's return it back. Apparently, it's occasionally useful

This combinator has the following type:

guarded :: Alternative f => (a -> Bool) -> a -> f a
@chshersh chshersh added new Bring something new into library (add function or type or interface) Hacktoberfest https://hacktoberfest.digitalocean.com/ labels Oct 4, 2019
@chshersh chshersh added this to the v0.6.0.0: Refinement milestone Oct 4, 2019
@JonathanLorimer
Copy link
Contributor

I would like to take a run at this, although I am not sure where it should live? Should I make a new file Alternative.hs?

@vrom911
Copy link
Member

vrom911 commented Oct 9, 2019

Thanks for taking this @JonathanLorimer !
I would expect it in the Relude.Bool.Guard module. @chshersh, could you please confirm that you had the same place in mind?

@chshersh
Copy link
Contributor Author

chshersh commented Oct 9, 2019

@vrom911 you're absolutely right. It should go to the Relude.Bool.Guard module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ new Bring something new into library (add function or type or interface)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants