paint-brush
Monads and More in 5 Minutes or Lessby@jcieslik
2,045 reads
2,045 reads

Monads and More in 5 Minutes or Less

by Joe Cieslik3mJune 15th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The necessity of monads in Haskell maintains the pure functionality of the language but can test the patience of its programmers. An understanding of monads is essential if you want to work with Haskell. This tutorial offers a quick look at the structure of the <code class="markup--code markup--p-code"><a href="http://hackage.haskell.org/package/base-4.11.1.0/docs/Control-Monad.html" target="_blank">Monad</a></code> typeclass. While you’ll need familiarity with Haskell, specifically, to understand how to tackle its <code class="markup--code markup--p-code">Monad</code> typeclass, the concepts presented in this tutorial are easily transferred to other languages. We’ll also be covering the <code class="markup--code markup--p-code"><a href="http://hackage.haskell.org/package/base-4.11.1.0/docs/Control-Applicative.html" target="_blank">Applicative</a></code> and <code class="markup--code markup--p-code"><a href="http://hackage.haskell.org/package/base-4.11.1.0/docs/Data-Functor.html" target="_blank">Functor</a></code> typeclasses. Let’s start with the boring, technical definition. A monad is a particular typeclass that is primarily composed of 2 functions, <code class="markup--code markup--p-code">bind</code> and <code class="markup--code markup--p-code">return</code>. This is simple enough, right? Now let’s break down some terminology and find out why these 2 functions are so powerful and how all of this affects your real world code.

Company Mentioned

Mention Thumbnail
featured image - Monads and More in 5 Minutes or Less
Joe Cieslik HackerNoon profile picture
Joe Cieslik

Joe Cieslik

@jcieslik

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Bitcoininsider
Aryan
Github