DEV Community

Cover image for Functor and Monad at a Glance
Ken Okabe
Ken Okabe

Posted on • Updated on

Functor and Monad at a Glance

image


🤩 Understand Functor and Monad at a glance ~ Preview of UNIT3 THEORY’s overview

  • Ordinary function

image

  • Monad function (Kleisli arrow)

image


  • (Endo)Functor and Monad are two sides of the same mathematical structure

image


  • The relationship between $id$ and $ID$ of (Endo)Functor and Monad

image


image


  • Pipelined functions can be linked (function composition)

image


  • In (Endo)Functor, functions are linked and composed in the pipeline for both the contents and the shell of the container

  • In Monad, link for Monad function is Kleisli composition

image


  • In (Endo)Functor, functions are linked and composed in the pipeline for both the contents and the shell of the container

image

image


  • In Monad, link for Monad function is Kleisli composition

image

image

Top comments (0)