plutus-contract-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.Contract.Util

Synopsis

Documentation

loopM :: Monad m => (a -> m (Either a b)) -> a -> m b Source #

A monadic version of loop, where the predicate returns Left as a seed for the next loop or Right to abort the loop.

https://hackage.haskell.org/package/extra-1.6.15/docs/src/Control.Monad.Extra.html#loopM

foldMaybe :: Monad m => (a -> b -> b) -> b -> m (Maybe a) -> m b Source #

Repeatedly evaluate the action until it yields Nothing, then return the aggregated result.

finally :: Monad m => m a -> m b -> m a Source #

Monadic version of <*

uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d Source #