Haskell Concepts in One Sentence
A monad is any data structure which implements bind. Bind is a higher-order function with two parameters - one is the data structure to be transformed, the other is a function which maps over elements in the data structure. However, unlike a normal map, each result of &quot;bind&quot; sits in its own version of the original data structure, which then have to be combined back into a single data structure. The way in which the data structures are combined is what makes each monad different.<p>For example, List is a monad. Suppose we had a List of Ints, such as [5,3,4]. If we were to run bind over this list, we would need a function that takes an Int and returns a List of something. We could use &quot;show&quot;, the function which converts Ints to Strings (a String is technically a List of Char. Since this is a List, we&#x27;re good). If we call bind using [5,3,4] and show, we get [&quot;5&quot;,&quot;3&quot;,&quot;4&quot;] which are then combined to &quot;534&quot;.<p>We can check with the interpreter (&gt;&gt;= is bind):<p>Prelude&gt; [5,3,4] &gt;&gt;= show<p>&quot;534&quot;