You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: