definitive-base-2.3: The base modules of the Definitive framework.

Algebra.Foldable

Synopsis

# Documentation

foldMap :: (Monoid m, Foldable t) => (a -> m) -> t a -> m Source

convert :: (Unit f, Monoid (f a), Foldable t) => t a -> f a Source

concat :: (Monoid m, Foldable t) => t m -> m Source

sum :: (Monoid m, Foldable t) => t m -> m Source

product :: (Ring m, Foldable t) => t m -> m Source

nzsum :: Semigroup m => [m] -> m Source

size :: (Foldable f, Ring n) => f a -> n Source

length :: [a] -> Int Source

maximum :: (Bounded a, Ord a, Foldable t) => t a -> a Source

maximumBy :: (Ord a, Foldable t) => (b -> a) -> b -> t b -> b Source

minimum :: (Bounded a, Ord a, Foldable t) => t a -> a Source

minimumBy :: (Ord a, Foldable t) => (b -> a) -> b -> t b -> b Source

sequence_ :: (Applicative f, Foldable t) => t (f a) -> f () Source

traverse_ :: (Applicative f, Foldable t) => (a -> f b) -> t a -> f () Source

for_ :: (Applicative f, Foldable t) => t a -> (a -> f b) -> f () Source

split :: (Foldable t, Monoid b, Monoid c) => t (b :+: c) -> (b, c) Source

partitionEithers :: (Foldable t, Unit t, Monoid (t a), Monoid (t b)) => t (a :+: b) -> (t a, t b) Source

partition :: (Unit f, Monoid (f a), Foldable t) => (a -> Bool) -> t a -> (f a, f a) Source

select :: (Unit f, Monoid (f a), Foldable t) => (a -> Bool) -> t a -> f a Source

refuse :: (Unit f, Monoid (f a), Foldable t) => (a -> Bool) -> t a -> f a Source

compose :: (Category k, Foldable t) => t (k a a) -> k a a Source

composing :: (Category k, Foldable t) => (a -> k b b) -> t a -> k b b Source

iter :: (Contravariant (k a), Category k, Foldable t) => k a (t (k a a) -> a) Source

foldr :: Foldable t => (b -> a -> a) -> a -> t b -> a Source

foldr1 :: (a -> a -> a) -> [a] -> a Source

foldl' :: Foldable t => (a -> b -> a) -> a -> t b -> a Source

foldl1' :: (a -> a -> a) -> [a] -> a Source

toList :: Foldable t => t a -> [a] Source

find :: Foldable t => (a -> Bool) -> t a -> Maybe a Source

or :: Foldable t => t Bool -> Bool Source

and :: Foldable t => t Bool -> Bool Source

all :: Foldable t => (a -> Bool) -> t a -> Bool Source

any :: Foldable t => (a -> Bool) -> t a -> Bool Source

elem :: (Eq a, Foldable t) => a -> t a -> Bool Source

empty :: Foldable f => f a -> Bool Source

nonempty :: Foldable f => f a -> Bool Source

sizeTo :: Foldable f => Int -> f a -> Int Source

Lazily counts the number of elements in a structure up to a certain size