safe-0.3.2: Library for safe (pattern match free) functions

Safe.Foldable

Description

Equivalent versions to the Safe module, but generalised to work over any Foldable type.

Synopsis

Documentation

mfl :: (a -> a -> a) -> Maybe a -> a -> Maybe aSource

foldl1Note :: Foldable t => String -> (a -> a -> a) -> t a -> aSource

 Same as Data.Foldable.foldl1

foldl1Def :: Foldable t => a -> (a -> a -> a) -> t a -> aSource

foldl1May :: Foldable t => (a -> a -> a) -> t a -> Maybe aSource

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

Default value is the mempty from a monoid

mfr :: (a -> a -> a) -> a -> Maybe a -> Maybe aSource

foldr1Note :: Foldable t => String -> (a -> a -> a) -> t a -> aSource

 Same as Data.Foldable.foldr1

foldr1Def :: Foldable t => a -> (a -> a -> a) -> t a -> aSource

foldr1May :: Foldable t => (a -> a -> a) -> t a -> Maybe aSource

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

Default value is the mempty from a monoid

findJust :: Foldable t => (a -> Bool) -> t a -> aSource

 Same as Data.Foldable.find

findJustDef :: Foldable t => a -> (a -> Bool) -> t a -> aSource

findJustNote :: Foldable t => String -> (a -> Bool) -> t a -> aSource

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

Default value is the mempty from a monoid