foldable1-0.1.0.0: Foldable types with at least 1 element

Safe HaskellNone
LanguageHaskell2010

Data.Foldable1

Documentation

class Foldable f => Foldable1 f where Source #

Minimal complete definition

foldMap1 | toNonEmpty

Methods

fold1 :: Semigroup a => f a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> f a -> b Source #

foldr1 :: (a -> a -> a) -> f a -> a Source #

foldl1 :: (a -> a -> a) -> f a -> a Source #

foldr1' :: (a -> a -> a) -> f a -> a Source #

foldl1' :: (a -> a -> a) -> f a -> a Source #

toNonEmpty :: f a -> NonEmpty a Source #

maximum :: Ord a => f a -> a Source #

minimum :: Ord a => f a -> a Source #

Instances
Foldable1 Identity Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Identity a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Identity a -> b Source #

foldr1 :: (a -> a -> a) -> Identity a -> a Source #

foldl1 :: (a -> a -> a) -> Identity a -> a Source #

foldr1' :: (a -> a -> a) -> Identity a -> a Source #

foldl1' :: (a -> a -> a) -> Identity a -> a Source #

toNonEmpty :: Identity a -> NonEmpty a Source #

maximum :: Ord a => Identity a -> a Source #

minimum :: Ord a => Identity a -> a Source #

Foldable1 NonEmpty Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => NonEmpty a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> NonEmpty a -> b Source #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldr1' :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1' :: (a -> a -> a) -> NonEmpty a -> a Source #

toNonEmpty :: NonEmpty a -> NonEmpty a Source #

maximum :: Ord a => NonEmpty a -> a Source #

minimum :: Ord a => NonEmpty a -> a Source #

Foldable1 ((,) a) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a0 => (a, a0) -> a0 Source #

foldMap1 :: Semigroup b => (a0 -> b) -> (a, a0) -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

foldr1' :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

foldl1' :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

toNonEmpty :: (a, a0) -> NonEmpty a0 Source #

maximum :: Ord a0 => (a, a0) -> a0 Source #

minimum :: Ord a0 => (a, a0) -> a0 Source #

Foldable1 f => Foldable1 (Reverse f) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Reverse f a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Reverse f a -> b Source #

foldr1 :: (a -> a -> a) -> Reverse f a -> a Source #

foldl1 :: (a -> a -> a) -> Reverse f a -> a Source #

foldr1' :: (a -> a -> a) -> Reverse f a -> a Source #

foldl1' :: (a -> a -> a) -> Reverse f a -> a Source #

toNonEmpty :: Reverse f a -> NonEmpty a Source #

maximum :: Ord a => Reverse f a -> a Source #

minimum :: Ord a => Reverse f a -> a Source #

Foldable1 f => Foldable1 (Backwards f) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Backwards f a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Backwards f a -> b Source #

foldr1 :: (a -> a -> a) -> Backwards f a -> a Source #

foldl1 :: (a -> a -> a) -> Backwards f a -> a Source #

foldr1' :: (a -> a -> a) -> Backwards f a -> a Source #

foldl1' :: (a -> a -> a) -> Backwards f a -> a Source #

toNonEmpty :: Backwards f a -> NonEmpty a Source #

maximum :: Ord a => Backwards f a -> a Source #

minimum :: Ord a => Backwards f a -> a Source #

(Foldable1 f, Foldable1 g) => Foldable1 (Product f g) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Product f g a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Product f g a -> b Source #

foldr1 :: (a -> a -> a) -> Product f g a -> a Source #

foldl1 :: (a -> a -> a) -> Product f g a -> a Source #

foldr1' :: (a -> a -> a) -> Product f g a -> a Source #

foldl1' :: (a -> a -> a) -> Product f g a -> a Source #

toNonEmpty :: Product f g a -> NonEmpty a Source #

maximum :: Ord a => Product f g a -> a Source #

minimum :: Ord a => Product f g a -> a Source #

(Foldable1 f, Foldable1 g) => Foldable1 (Sum f g) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Sum f g a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Sum f g a -> b Source #

foldr1 :: (a -> a -> a) -> Sum f g a -> a Source #

foldl1 :: (a -> a -> a) -> Sum f g a -> a Source #

foldr1' :: (a -> a -> a) -> Sum f g a -> a Source #

foldl1' :: (a -> a -> a) -> Sum f g a -> a Source #

toNonEmpty :: Sum f g a -> NonEmpty a Source #

maximum :: Ord a => Sum f g a -> a Source #

minimum :: Ord a => Sum f g a -> a Source #

(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) Source # 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup a => Compose f g a -> a Source #

foldMap1 :: Semigroup b => (a -> b) -> Compose f g a -> b Source #

foldr1 :: (a -> a -> a) -> Compose f g a -> a Source #

foldl1 :: (a -> a -> a) -> Compose f g a -> a Source #

foldr1' :: (a -> a -> a) -> Compose f g a -> a Source #

foldl1' :: (a -> a -> a) -> Compose f g a -> a Source #

toNonEmpty :: Compose f g a -> NonEmpty a Source #

maximum :: Ord a => Compose f g a -> a Source #

minimum :: Ord a => Compose f g a -> a Source #

intercalate :: (Foldable1 f, Semigroup a) => a -> f a -> a Source #

foldrM1 :: (Foldable1 f, Monad m) => (a -> a -> m a) -> f a -> m a Source #

foldlM1 :: (Foldable1 f, Monad m) => (a -> a -> m a) -> f a -> m a Source #