Safe Haskell | None |
---|---|
Language | Haskell2010 |
The functions in Data.MonoTraversable are all prefixed with the letter
o
to avoid conflicts with their polymorphic counterparts. This module
exports the same identifiers without the prefix, for all cases where the
monomorphic variant loses no generality versus the polymorphic version. For
example, olength
is just as general as Data.Foldable.length
, so we
export length = length
. By contrast, omap
cannot fully subsume fmap
or
map
, so we do not provide such an export.
Since: 1.0.0
Synopsis
- foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
- foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b
- foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a
- toList :: MonoFoldable mono => mono -> [Element mono]
- all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
- any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool
- null :: MonoFoldable mono => mono -> Bool
- length :: MonoFoldable mono => mono -> Int
- length64 :: MonoFoldable mono => mono -> Int64
- compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering
- traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f ()
- for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f ()
- mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()
- forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m ()
- foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
- foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m
- foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
- foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono
- sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
- product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono
- and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool
- or :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool
- concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m
- elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool
- notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool
- point :: MonoPointed mono => Element mono -> mono
- intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono
- fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
- concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono
- foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a
- sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m ()
Documentation
foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m Source #
Synonym for ofoldMap
Since: 1.0.0
foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b Source #
Synonym for ofoldr
Since: 1.0.0
foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a Source #
Synonym for ofoldl'
Since: 1.0.0
all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool Source #
Synonym for oall
Since: 1.0.0
any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool Source #
Synonym for oany
Since: 1.0.0
compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering Source #
Synonym for ocompareLength
Since: 1.0.0
traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f () Source #
Synonym for otraverse_
Since: 1.0.0
for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f () Source #
Synonym for ofor_
Since: 1.0.0
mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m () Source #
Synonym for omapM_
Since: 1.0.0
forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m () Source #
Synonym for oforM_
Since: 1.0.0
foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a Source #
Synonym for ofoldlM
Since: 1.0.0
foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m Source #
Synonym for ofoldMap1Ex
Since: 1.0.0
foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono Source #
Synonym for ofoldr1Ex
Since: 1.0.0
foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono Source #
Synonym for ofoldl1Ex'
Since: 1.0.0
sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono Source #
Synonym for osum
Since: 1.0.0
product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono Source #
Synonym for oproduct
Since: 1.0.0
and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool Source #
Synonym for oand
Since: 1.0.0
concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m Source #
Synonym for oconcatMap
Since: 1.0.0
elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool Source #
Synonym for oelem
Since: 1.0.0
notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool Source #
Synonym for onotElem
Since: 1.0.0
intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono Source #
Synonym for ointercalate
Since: 1.0.0
fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono Source #
Synonym for ofold
Since: 1.0.0
concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono Source #
Synonym for oconcat
Since: 1.0.0
foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a Source #
Synonym for ofoldM
Since: 1.0.0
sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m () Source #
Synonym for osequence_
Since: 1.0.0