Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Monads Transformation

69 views

Published on

The slides explain the practical steps to perform Monads transformation. The Meetup session was organized by Knoldus as a part of Knolfest.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Monads Transformation

  1. 1. Agenda ➔ Brief ➔ Hurdles While Using Monad Composition??? ➔ Dream solution :) ➔ Transformation ➔ Scala Cats MonadT Classes.
  2. 2. Thanks
  3. 3. For the things we have to learn before we can do them, we learn by doing them.
  4. 4. Brief
  5. 5. Brief
  6. 6. Hurdles While Using Monad Composition
  7. 7. Dream Solution :) for { user <- userOption <- repository.getUserOption(1) city <- cityOption <- repository.getAddressOption(user) } yield city
  8. 8. Transformation
  9. 9. Scala Cats MonadT Classes ➔ OptionT ➔ EitherT ➔ XorT ➔ ReaderT ➔ WriterT ➔ StateT and more...
  10. 10. References https://blog.buildo.io/monad-transformers-for-the-working-programmer- aa7e981190e7 https://www.youtube.com/watch?v=jd5e71nFEZM https://github.com/knoldus/fp-scala-knolx
  11. 11. Thanks

×