plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

PlutusTx.Foldable

Synopsis

Documentation

class Foldable t where Source #

Plutus Tx version of Foldable.

Methods

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

Plutus Tx version of foldMap.

Instances

Instances details
Foldable [] Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> [a] -> m Source #

Foldable Maybe Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source #

Foldable Identity Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> Identity a -> m Source #

Foldable (Either c) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> Either c a -> m Source #

Foldable ((,) c) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> (c, a) -> m Source #

Foldable (Map k) Source # 
Instance details

Defined in PlutusTx.AssocMap

Methods

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

Foldable (Const c :: Type -> Type) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldMap :: Monoid m => (a -> m) -> Const c a -> m Source #

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_.

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () Source #

Plutus Tx version of sequence_.

asum :: (Foldable t, Alternative f) => t (f a) -> f a Source #

Plutus Tx version of asum.

Monadic actions

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () Source #

Plutus Tx version of mapM_.

Specialized folds

concat :: Foldable t => t [a] -> [a] Source #

Plutus Tx version of concat.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] Source #

Plutus Tx version of concatMap.

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

Plutus Tx version of and.

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

Plutus Tx version of or.

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

Plutus Tx version of any.

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

Plutus Tx version of all.

Searches

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

Plutus Tx version of notElem.

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

Plutus Tx version of find.

Other

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

Plutus Tx version of fold.

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

Plutus Tx version of foldr.

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

Plutus Tx version of foldl.

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

Plutus Tx version of toList.

null :: Foldable t => t a -> Bool Source #

Plutus Tx version of null.

length :: Foldable t => t a -> Integer Source #

Plutus Tx version of length.

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

Plutus Tx version of elem.

sum :: (Foldable t, AdditiveMonoid a) => t a -> a Source #

Plutus Tx version of sum.

product :: (Foldable t, MultiplicativeMonoid a) => t a -> a Source #

Plutus Tx version of product.