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

Comments

Projects
None yet
2 participants
@chshersh
Copy link
Member

commented Jul 21, 2018

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

See this proposal:

@chshersh

This comment has been minimized.

Copy link
Member Author

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 chshersh closed this in #56 Aug 27, 2018

chshersh added a commit that referenced this issue Aug 27, 2018

[#41] Add `Foldable1` (#56)
* [#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
You can’t perform that action at this time.