plutus-tx-1.34.1.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Foldable

Synopsis

Documentation

class Foldable t where Source #

Plutus Tx version of Foldable.

Methods

foldr ∷ (a → b → b) → b → t a → b Source #

Plutus Tx version of foldr.

Instances

Instances details
Foldable Identity Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → Identity a → b Source #

Foldable Maybe Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → Maybe a → b Source #

Foldable List Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → [a] → b Source #

Foldable (Either c) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → Either c a → b Source #

Foldable (Map k) Source # 
Instance details

Defined in PlutusTx.AssocMap

Methods

foldr ∷ (a → b → b) → b → Map k a → b Source #

Foldable ((,) c) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → (c, a) → b Source #

Foldable (Const c ∷ TypeType) Source # 
Instance details

Defined in PlutusTx.Foldable

Methods

foldr ∷ (a → b → b) → b → Const c a → b Source #

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

asum ∷ (Foldable t, Alternative f) ⇒ t (f a) → f a Source #

Plutus Tx version of asum.

Specialized folds

concatFoldable t ⇒ t [a] → [a] Source #

Plutus Tx version of concat.

concatMapFoldable t ⇒ (a → [b]) → t a → [b] Source #

Plutus Tx version of concatMap.

Other

foldMap ∷ (Foldable t, Monoid m) ⇒ (a → m) → t a → m Source #

Plutus Tx version of foldMap.

fold ∷ (Foldable t, Monoid m) ⇒ t m → m Source #

Plutus Tx version of fold.

foldlFoldable t ⇒ (b → a → b) → b → t a → b Source #

Plutus Tx version of foldl.

toListFoldable t ⇒ t a → [a] Source #

Plutus Tx version of toList.

lengthFoldable t ⇒ t a → Integer Source #

Plutus Tx version of length.

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.