Ep 12: ReaderT is good for the environment
If you're new to this series I make videos about functional programming, category theory, Scala, Haskell, Lisp and other functional languages.
This video continues with an expression evaluator program and the theme of Monad Transformers. I implemented and used the WriterT monad a couple of videos ago, so this time I build the ReaderT monad and explain what it is used for. In this case we stop using Scala 3 context functions (from episode 1) to thread some data through our program, and instead use the ReaderT monad. Once we create the new classes we simply change the return type of our program and follow the red squiggly lines (errors) to guide us to a working example of ReaderT.
You can get the code for this video here:
https://github.com/justinhj/evalexample/blob/video12/src/main/scala/livevideos/Video12.scala
Scala stuff by me
Video editing by Jamie
Intro music "Functional Justin Intro 1" by me
©2020-2021 Justin Heyes-Jones. All Rights Reserved
Видео Ep 12: ReaderT is good for the environment канала Functional Justin
This video continues with an expression evaluator program and the theme of Monad Transformers. I implemented and used the WriterT monad a couple of videos ago, so this time I build the ReaderT monad and explain what it is used for. In this case we stop using Scala 3 context functions (from episode 1) to thread some data through our program, and instead use the ReaderT monad. Once we create the new classes we simply change the return type of our program and follow the red squiggly lines (errors) to guide us to a working example of ReaderT.
You can get the code for this video here:
https://github.com/justinhj/evalexample/blob/video12/src/main/scala/livevideos/Video12.scala
Scala stuff by me
Video editing by Jamie
Intro music "Functional Justin Intro 1" by me
©2020-2021 Justin Heyes-Jones. All Rights Reserved
Видео Ep 12: ReaderT is good for the environment канала Functional Justin
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Ep 11: Search Hacker News with ZIO and magicEp 13: Another angle on monad transformers with Zio PreludeEp 9: Transformers, Monads in DisguiseEp 1: Scala 3 Enums, Implicits, and Context FunctionsEp 8: Compose Yourself with Scala 3's Opaque TypesEp 16: NonEmptyLists more or lessEp 4: Scala 3 type classesEp 3: Evaluating our Numeric Type classEp 2: Type classes with Scala 2Ep 15: Advent of Code 2021 Day 1. Is it Traverse?Ep 14: Monad transformers using the Cats MTL libraryEp 5: Scala 3 Type lambdas, Functors and error handlingEp 17: The Magic of LazyListsEp 6: Functional error handling with applicative in Scala 3Ep 7: Monads with Scala 3 for the GeniusEp 10: Tell me more! Add logging to a pure program with Applicative and WriterT in Scala 3