| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusTx.Foldable
Synopsis
- class Foldable t where
- foldr :: (a -> b -> b) -> b -> t a -> 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 ()
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- concat :: Foldable t => t [a] -> [a]
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
- fold :: (Foldable t, Monoid m) => t m -> m
- foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- toList :: Foldable t => t a -> [a]
- length :: Foldable t => t a -> Integer
- 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.
Instances
| Foldable Identity Source # | |
Defined in PlutusTx.Foldable | |
| Foldable Maybe Source # | |
Defined in PlutusTx.Foldable | |
| Foldable List Source # | |
Defined in PlutusTx.Foldable | |
| Foldable (Either c) Source # | |
Defined in PlutusTx.Foldable | |
| Foldable (Map k) Source # | |
Defined in PlutusTx.AssocMap | |
| Foldable ((,) c) Source # | |
Defined in PlutusTx.Foldable | |
| Foldable (Const c :: Type -> Type) Source # | |
Defined in PlutusTx.Foldable | |
Applicative actions
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () Source #
Plutus Tx version of traverse_.
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () Source #
Plutus Tx version of sequenceA_.