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

Non empty lists #83

Open
adamnfish opened this issue Mar 17, 2015 · 0 comments
Open

Non empty lists #83

adamnfish opened this issue Mar 17, 2015 · 0 comments

Comments

@adamnfish
Copy link
Contributor

It'd be nice to try and embed more of the business rules in the types to make implementations simpler. In particular, it's impossible for there to be 0 collections on a front, so that could be represented with a non-empty-list type. This would allow us to safely call head to get the first collection without having to provide dummy fallback content (see the upcoming feature on "canonical collections").

Scalaz has a NonEmptyList type that would suit this very well.

Not urgent, but it'd make the code clearer and adding some new features easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant