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
Should foldl1 and foldr1 be added either to the Foldable1 class or as helpers in the Data.Semigroup.Foldable module? They can be implemented, if awkwardly, in terms of foldMap1:
but allowing instances to define their own for efficiency, as Foldable does, would be nice (in which case these could also be added as default implementations).
The text was updated successfully, but these errors were encountered:
Adding foldl1 and foldr1 to the class without the Semigroup constraint sounds good to me. It's breaking, but only for types which define a Foldable1 instance. Is FoldRight1 a genuine semigroup, or just a hack to get the thing to work?
Should
foldl1
andfoldr1
be added either to theFoldable1
class or as helpers in theData.Semigroup.Foldable
module? They can be implemented, if awkwardly, in terms offoldMap1
:but allowing instances to define their own for efficiency, as
Foldable
does, would be nice (in which case these could also be added as default implementations).The text was updated successfully, but these errors were encountered: