semigroupoids-4.0: Semigroupoids: Category sans id

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Inferred

Data.Semigroup.Foldable

Description

 

Synopsis

Documentation

class Foldable t => Foldable1 t whereSource

Methods

fold1 :: Semigroup m => t m -> mSource

foldMap1 :: Semigroup m => (a -> m) -> t a -> mSource

Instances

Foldable1 Identity 
Foldable1 Tree 
Foldable1 NonEmpty 
Foldable1 m => Foldable1 (IdentityT m) 
(Foldable1 f, Foldable1 g) => Foldable1 (Coproduct f g) 
(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) 
(Foldable1 f, Foldable1 g) => Foldable1 (Product f g) 

traverse1_ :: (Foldable1 t, Apply f) => (a -> f b) -> t a -> f ()Source

for1_ :: (Foldable1 t, Apply f) => t a -> (a -> f b) -> f ()Source

sequenceA1_ :: (Foldable1 t, Apply f) => t (f a) -> f ()Source

foldMapDefault1 :: (Foldable1 t, Monoid m) => (a -> m) -> t a -> mSource

Usable default for foldMap, but only if you define foldMap1 yourself