Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Foldable1
Documentation
class Foldable f => Foldable1 f where Source #
Minimal complete definition
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 #
Instances
Foldable1 Identity Source # | |
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 # | |
Foldable1 NonEmpty Source # | |
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 # | |
Foldable1 ((,) a) Source # | |
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 # | |
Foldable1 f => Foldable1 (Reverse f) Source # | |
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 # | |
Foldable1 f => Foldable1 (Backwards f) Source # | |
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 # | |
(Foldable1 f, Foldable1 g) => Foldable1 (Product f g) Source # | |
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 # | |
(Foldable1 f, Foldable1 g) => Foldable1 (Sum f g) Source # | |
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 # | |
(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) Source # | |
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 # |
intercalate :: (Foldable1 f, Semigroup a) => a -> f a -> a Source #