explain "cohere"
[lambda.git] / topics / week7_introducing_monads.mdwn
index 8b3428c..88d49ad 100644 (file)
@@ -208,7 +208,7 @@ has to obey the following Map Laws:
         k >=> mid == k
         mid >=> k == k
 
         k >=> mid == k
         mid >=> k == k
 
-    If you studied algebra, you'll remember that a mon*oid* is a universe with some associative operation that has an identity. For example, the natural numbers form a monoid with multiplication as the operation and `1` as the identity, or with addition as the operation and `0` as the identity. Strings form a monoid with concatenation as the operation and the empty string as the identity. (This example shows that the operation need not be commutative.) Monads are a kind of generalization of this notion, and that's why they're named as they are. The key difference is that for monads, the values being operated on need not be of the same type. They *can* be, if they're all Kleisli arrows of a single type <code>P -> <u>P</u></code>. But they needn't be. Their types only need to "cohere" in certain ways.
+    If you studied algebra, you'll remember that a mon*oid* is a universe with some associative operation that has an identity. For example, the natural numbers form a monoid with multiplication as the operation and `1` as the identity, or with addition as the operation and `0` as the identity. Strings form a monoid with concatenation as the operation and the empty string as the identity. (This example shows that the operation need not be commutative.) Monads are a kind of generalization of this notion, and that's why they're named as they are. The key difference is that for monads, the values being operated on need not be of the same type. They *can* be, if they're all Kleisli arrows of a single type <code>P -> <u>P</u></code>. But they needn't be. Their types only need to "cohere" in the sense that the output type of the one arrow is a boxing of the input type of the next.
 
     In the Haskell manuals, they express the Monad Laws using `>>=` instead of the composition operators `>=>` or `<=<`. This looks similar, but doesn't have the same symmetry:
 
 
     In the Haskell manuals, they express the Monad Laws using `>>=` instead of the composition operators `>=>` or `<=<`. This looks similar, but doesn't have the same symmetry:
 
@@ -437,7 +437,7 @@ As we mentioned above, the notions of Monads have their origin in Category Theor
 [1](http://en.wikipedia.org/wiki/Outline_of_category_theory)
 [2](http://lambda1.jimpryor.net/advanced_topics/monads_in_category_theory/)
 [3](http://en.wikibooks.org/wiki/Haskell/Category_theory)
 [1](http://en.wikipedia.org/wiki/Outline_of_category_theory)
 [2](http://lambda1.jimpryor.net/advanced_topics/monads_in_category_theory/)
 [3](http://en.wikibooks.org/wiki/Haskell/Category_theory)
-[4](https://wiki.haskell.org/Category_theory), where you should follow the further links discussing Functors, Natural Transformations, and Monads.
+[4](https://wiki.haskell.org/Category_theory) <small>(where you should follow the further links discussing Functors, Natural Transformations, and Monads)</small>
 [5](http://www.stephendiehl.com/posts/monads.html)
 
 
 [5](http://www.stephendiehl.com/posts/monads.html)