4
votes
Accepted
Understanding do notation with Monads in Plutus Pioneer Week 04
The 'secret' is in the bindWriter function that drive the Writer monad.
instance Monad Writer where
return a = Writer a []
(>>=) = bindWriter
It is the bindWriter function that ...
2
votes
Test-Focused EvaluatorTrace Monad?
There are now test capabilities in the Plutus.Contract.Test module which uses the Tasty library.
This is explained more fully in the unit tests section of lecture 8 of iteration 1 of the Plutus ...
2
votes
Accepted
Whats Your Mental Model For Monads?
Just read one definition:
A monad is just the minimal amount of structure needed to overload a function composition in a way that performs an extra computation on the intermediate value.
My ...
1
vote
Accepted
How to define the return type of `callEndPoint` appropriately?
I don't know if this is what you expect but there are three ways to get rid of warnings:
add {-# LANGUAGE MonoLocalBinds #-}, like the warning hints
don't give a type for payTo and let Haskell ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
monad × 6plutus × 3
plutus-pioneer-program × 3
haskell × 3
smart-contract × 2
plutus-playground × 1
script × 1
validator × 1