SimpleH-1.0.1: A light, clean and powerful Haskell utility library

Safe HaskellNone

SimpleH.Foldable

Documentation

newtype Sized f a Source

Constructors

Sized 

Fields

getSized :: f a
 

Instances

(Foldable f, Semigroup (Sized f a), Monoid n, Num n) => SubSemi n (Sized f a) 

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

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

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

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

size :: (Foldable f, Num n, Monoid n) => f a -> nSource

count :: (Num n, Monoid n, Foldable f) => f a -> nSource

length :: (Num n, Monoid n) => [a] -> nSource

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

filter :: (Unit f, Monoid (f a), Foldable t) => (a -> Bool) -> t a -> f aSource

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

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

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

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

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

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

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

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

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

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

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

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

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