Safe Haskell | None |
---|---|
Language | Haskell2010 |
PlutusTx.Foldable
Synopsis
- class Foldable t where
- foldrM :: ( Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- foldlM :: ( Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- traverse_ :: ( Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- for_ :: ( Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
- sequenceA_ :: ( Foldable t, Applicative f) => t (f a) -> f ()
- sequence_ :: ( Foldable t, Monad m) => t (m a) -> m ()
- asum :: ( Foldable t, Alternative f) => t (f a) -> f a
- mapM_ :: ( Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- concat :: Foldable t => t [a] -> [a]
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- and :: Foldable t => t Bool -> Bool
- or :: Foldable t => t Bool -> Bool
- any :: Foldable t => (a -> Bool ) -> t a -> Bool
- all :: Foldable t => (a -> Bool ) -> t a -> Bool
- notElem :: ( Foldable t, Eq a) => a -> t a -> Bool
- find :: Foldable t => (a -> Bool ) -> t a -> Maybe a
- fold :: ( Foldable t, Monoid m) => t m -> m
- foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
- foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- toList :: Foldable t => t a -> [a]
- null :: Foldable t => t a -> Bool
- length :: Foldable t => t a -> Integer
- elem :: ( Foldable t, Eq a) => a -> t a -> Bool
- sum :: ( Foldable t, AdditiveMonoid a) => t a -> a
- product :: ( Foldable t, MultiplicativeMonoid a) => t a -> a
Documentation
class Foldable t where Source #
Plutus Tx version of
Foldable
.
Special biased folds
foldrM :: ( Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b Source #
Plutus Tx version of
foldrM
.
foldlM :: ( Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b Source #
Plutus Tx version of
foldlM
.
Folding actions
Applicative actions
traverse_ :: ( Foldable t, Applicative f) => (a -> f b) -> t a -> f () Source #
Plutus Tx version of
traverse_
.
for_ :: ( Foldable t, Applicative f) => t a -> (a -> f b) -> f () Source #
Plutus Tx version of
for_
.
sequenceA_ :: ( Foldable t, Applicative f) => t (f a) -> f () Source #
Plutus Tx version of
sequenceA_
.