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

Create interface NonEmptyList #1244

Closed
danieldietrich opened this Issue Mar 30, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@danieldietrich
Copy link
Member

danieldietrich commented Mar 30, 2016

List.Cons <: NonEmptyList <: List

This is useful in conjunction with Validation, see http://eed3si9n.com/learning-scalaz/Validation.html#NonEmptyList

NonEmptyList is best placed as top level class within javaslang.collection.

@danieldietrich danieldietrich added this to the 2.1.0 milestone Mar 30, 2016

@mvh77

This comment has been minimized.

Copy link
Contributor

mvh77 commented Apr 7, 2016

You can also check out Scalactic Chain which is a non empty list and Every which is a non empty vector:
http://doc.scalatest.org/2.2.4/index.html#org.scalactic.Chain
http://doc.scalatest.org/2.2.4/index.html#org.scalactic.Every

I hope you don't plan on doing any API breaking changes in any future minor milestone?

@danieldietrich

This comment has been minimized.

Copy link
Member Author

danieldietrich commented Apr 9, 2016

Thanks Martti, I will check those out.

Javaslang needs to be stable on minor releases!

@danieldietrich danieldietrich modified the milestones: 2.2.0, 2.1.0 Aug 26, 2016

@danieldietrich danieldietrich modified the milestones: 2.1.0, 2.2.0 Oct 23, 2016

@danieldietrich danieldietrich modified the milestones: 3.0.0, 2.1.0 Mar 5, 2017

@danieldietrich

This comment has been minimized.

Copy link
Member Author

danieldietrich commented Nov 26, 2017

I don't see the reason why to have NonEmptyList. Why not use List.Cons instead?
I will close this issue, it looks artificial to have such an interface only for List but not for all Traversables or at least for all sequences. But that would be too much for Vavr.

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.