data STree a = Leaf a | Branch [STree a]Define (and, at home, verify) a
Functor instance for STree.
Monad and state its invariants.
do notation translated into core Haskell
using Monad class members?
Define (and, at home, verify) a Monad instance for
Either e.
Why the letter ``e''?
Monad instance for STree.
newtype State s a = State {runState :: (s -> (a, s))}
Define (and, at home, verify) a Functor instance for State s.
Monad instance for State s.
newtype StateT s (m::* -> *) a = StateT {runStateT :: (s -> m (a, s))}
Define (and, at home, verify) a Monad instance for StateT s m.