plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

UntypedPlutusCore.Core.Zip

Synopsis

Documentation

pzipWith ∷ ∀ p name uni fun ann1 ann2 ann3 m. (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → p ann1 → p ann2 → m (p ann3) Source #

Zip two programs using a combinator function for annotations.

Throws an error if the input programs are not "equal" modulo annotations. Note that the function is "left-biased", so in case that the 2 input programs contain Names, the output program will contain just the Names of the first input program.

pzip ∷ (p ~ Program name uni fun, Eq (Term name uni fun ()), MonadError String m) ⇒ p ann1 → p ann2 → m (p (ann1, ann2)) Source #

Zip 2 programs by pairing their annotations

tzipWith ∷ ∀ t name uni fun ann1 ann2 ann3 m. (t ~ Term name uni fun, Eq (t ()), MonadError String m) ⇒ (ann1 → ann2 → ann3) → t ann1 → t ann2 → m (t ann3) Source #

Zip two terms using a combinator function for annotations.

Throws an error if the input terms are not "equal" modulo annotations. Note that the function is "left-biased", so in case that the 2 input terms contain Names, the output term will contain just the Names of the first input term. TODO: this is not an optimal implementation

tzip ∷ (t ~ Term name uni fun, Eq (t ()), MonadError String m) ⇒ t ann1 → t ann2 → m (t (ann1, ann2)) Source #

Zip 2 terms by pairing their annotations