Questions

  1. Why does the type of monad transformer reflect the type of the stack "upside-down" with its name referring to the type of innermost monad?
  2. Why is it possible to reuse existing monads for the top layer of the stack?
  3. Why is it impossible to reuse existing monads for the bottom layer of the stack?
  4. Implement a TryT monad transformer.
  5. Use the TryT monad transformer instead of EitherT with the example functions from the chapter.
  6. Implement another take on the monad transformer stack, this time with the layers placed upside-down: EitherT[OptionT[Future, A], String, A].
  7. Add an action to release the caught fish in the free monad example we developed in the chapter.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.126.199