Slide 1

Slide 1 text

Monads…and Monads… In 10 minutes…???

Slide 2

Slide 2 text

— Someone not Famous “The goal of Category theory is to show that trivial things are trivially trivial…”

Slide 3

Slide 3 text

Some words about it… Category Theory 01

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

Categories Map of the Middle Earth of the Lord of the Rings. Elves have made it.

Slide 7

Slide 7 text

Functors Now another map of the Seven Kingdoms of Game of Thrones.

Slide 8

Slide 8 text

Functors… and transform 01 02 03 04

Slide 9

Slide 9 text

Whoa!

Slide 10

Slide 10 text

Monads Now another map of the Middle Earth, but this time, drawn by a Dwarf.

Slide 11

Slide 11 text

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)

Slide 12

Slide 12 text

A Monad? WTF? 02 From a Functional Programming perspective…

Slide 13

Slide 13 text

MONAD: a bubble that encapsulates a computation that supports 2 main functions: map() flatMap()

Slide 14

Slide 14 text

Tiny demo We are not fully aware on how much nowadays we use monadic types. They are all over the place!

Slide 15

Slide 15 text

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/