Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Monads...and Monads...

Monads...and Monads...

Just a tiny presentation trying to explain monadic types in 10 minutes by giving a bit of an overview of Mathematics Category Theory.

Fernando Cejas

May 05, 2022

More Decks by Fernando Cejas

Other Decks in Technology


  1. — Someone not Famous “The goal of Category theory is

    to show that trivial things are trivially trivial…”
  2. Category Theory is a mathematical discipline with a wide range

    of applications in theoretical computer science. Concepts like Category, Functor, Monad, and others, which were originally defined in Category Theory, have become pivotal for the understanding of modern Functional Programming (FP) languages and paradigms. The meaning and applications of these terms in FP can be understood without in-depth knowledge of the corresponding mathematical definitions and axiomatic. However, a common knowledge of the underlying theory can help FP programmers understand the design and structure of commonly used libraries and tools and be more productive. Category Theory
  3. Whoa! • Categories • Monoids • Isomorphisms • Duality Principle

    • Functors Shamelessly taken from wikibooks of haskell Hask category treats Haskell types as objects and Haskell functions as morphisms and uses for composition ((\circ)) the function ((.)), a function (f :: A -> B) for types A and B is a morphism in Hask.
  4. Categories Map of the Middle Earth of the Lord of

    the Rings. Elves have made it.
  5. Monads If an endofunctor also fulfills that it has two

    natural transformations such as the identity function and another function that is associative, we can say that we have a monad (this we call monadic laws)
  6. Tiny demo We are not fully aware on how much

    nowadays we use monadic types. They are all over the place!
  7. CREDITS: This presentation template was created by Slidesgo, including icons

    by Flaticon, and infographics & images by Freepik Thanks! Do you have any questions? @fernando_cejas fernandocejas.com • https://dev.to/juaneto/knowing-monads-through-the-category-theory-1mea • https://ernestobossi.com/categories/monads/functors/introduction-catgories/ • https://nikgrozev.com/2016/03/14/functional-programming-and-category-theory-part-1-categories-and-functors/ • https://nikgrozev.com/2016/04/11/functional-programming-and-category-theory-part-2-applicative-functors/ • http://www.jeanfrancoisparadis.com/blog/2014/01/13/monads-in-10-minutes/