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 'Foldable1' #41

Closed
chshersh opened this issue Jul 21, 2018 · 1 comment
Closed

Add 'Foldable1' #41

chshersh opened this issue Jul 21, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request new Bring something new into library (add function or type or interface)

Comments

@chshersh
Copy link
Contributor

chshersh commented Jul 21, 2018

So we can try to use it before it gets merged to base.

See this proposal:

@chshersh chshersh added enhancement New feature or request new Bring something new into library (add function or type or interface) labels Jul 21, 2018
@chshersh
Copy link
Contributor Author

chshersh commented Aug 8, 2018

I would like to have this function inside typeclass (and probably much-much more):

toNonEmpty :: f a -> NonEmpty a

We need to implement functions like traverse1_, for1_ from semigroupoids package link. And also maximum1, head1, mininum1, etc. from initial proposal

Also, we probably want to add more instances than in library. So it's better to take inspiration from existing pending implementation in base library.

According to review comments, this change won't appear in base in nearest couple years. But it would be great if we could use it in relude.

@chshersh chshersh added this to the v0.2.0: More improvements milestone Aug 11, 2018
ghallak added a commit that referenced this issue Aug 14, 2018
ghallak added a commit that referenced this issue Aug 21, 2018
chshersh pushed a commit that referenced this issue Aug 27, 2018
* [#41] Add `Foldable1`

* Fix after review

* Add instance for ((,) c) and other review fixes

* Add copyright and tiny style fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new Bring something new into library (add function or type or interface)
Projects
None yet
Development

No branches or pull requests

2 participants