Want to keep learning?

This content is taken from the The University of Glasgow's online course, Functional Programming in Haskell: Supercharge Your Coding. Join the course to learn more.

Summary

A monad is a mechanism for combining computations. It is a typeclass providing the bind and return operations.

To be an actual monadic type, the implementations of bind and return must conform to the three monad laws.

The Maybe monad illustrates how to create a simple monad and demonstrates its benefits.

Share this article:

This article is from the free online course:

Functional Programming in Haskell: Supercharge Your Coding

The University of Glasgow

Get a taste of this course

Find out what this course is like by previewing some of the course steps before you join: