tweak calc improvements
[lambda.git] / advanced_topics / monads_in_category_theory.mdwn
index e77de46..da99f40 100644 (file)
@@ -486,6 +486,7 @@ Collecting the results, our monad laws turn out in this format to be:
        (iii.2') (join (unit M)) = the identity transformation
 </pre>
 
+In category-theory presentations, you may see `unit` referred to as <code>&eta;</code>, and `join` referred to as <code>&mu;</code>. Also, instead of the monad `(M, unit, join)`, you may sometimes see discussion of the "Kleisli triple" `(M, unit, =<<)`. Alternatively, `=<<` may be called <code>&#8902;</code>. These are interdefinable (see below).
 
 
 Getting to the functional programming presentation of the monad laws
@@ -499,7 +500,7 @@ A monad `M` will consist of a mapping from types `'t` to types `M('t)`, and a ma
 
 In functional programming, instead of working with natural transformations we work with "monadic values" and polymorphic functions "into the monad."
 
-A "monadic value" is any member of a type `M('t)`, for any type `'t`. For example, any `int list` is a monadic value for the list monad. We can think of these monadic values as the result of applying some function `phi`, whose type is `F('t)->M(F'('t))`. `'t` here is any collection of free type variables, and `F('t)` and `F'('t)` are types parameterized on `'t`. An example, with `M` being the list monad, `'t` being `('t1,'t2)`, `F('t1,'t2)` being `char * 't1 * 't2`, and `F'('t1,'t2)` being `int * 't1 * 't2`:
+A "monadic value" is any member of a type `M('t)`, for any type `'t`. For example, any `int list` is a monadic value for the list monad. We can think of these monadic values as the result of applying some function `phi`, whose type is `F('t) -> M(F'('t))`. `'t` here is any collection of free type variables, and `F('t)` and `F'('t)` are types parameterized on `'t`. An example, with `M` being the list monad, `'t` being `('t1,'t2)`, `F('t1,'t2)` being `char * 't1 * 't2`, and `F'('t1,'t2)` being `int * 't1 * 't2`:
 
 <pre>
        let phi = fun ((_:char), x, y) -> [(1,x,y),(2,x,y)]
@@ -508,7 +509,7 @@ A "monadic value" is any member of a type `M('t)`, for any type `'t`. For exampl
 [-- I intentionally chose this polymorphic function because simpler ways of mapping the polymorphic monad operations from functional programming onto the category theory notions can't accommodate it. We have all the F, MF' (unit G') and so on in order to be able to be handle even phis like this. --]
 
 
-Now where `gamma` is another function of type <code>F'('t) &rarr; M(G'('t))</code>, we define:
+Now where `gamma` is another function of type <code>F'('t) -> M(G'('t))</code>, we define:
 
 <pre>
        gamma =<< phi a  =def. ((join G') -v- (M gamma)) (phi a)