Alternative.some and NonEmpty
Henning Thielemann
lemming at henning-thielemann.de
Tue Mar 7 16:40:01 UTC 2017
On Tue, 7 Mar 2017, Mario Blažević wrote:
> If we're adding a new function, it might make more sense to add
> something more generic, like
>
> genericMany, genericSome ::
> (Alternative f, Applicative m, Monoid m) => f a -> f (m a)
>
> The expected type of these operations is usually fixed on the client side.
I think it must be Monoid (m a). But it won't work, because NonEmpty is no
Monoid because there is no mempty.
More information about the Libraries
mailing list