X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek7_introducing_monads.mdwn;h=5f822866724eddd443291717378bc11130d4c267;hp=57afcb977d0991cfbfa842bce05bba4750137887;hb=b1ced32e0ccd66737ef9ad8b038df32656865ae3;hpb=28c12de567214f348853ddb23e1a0bb23676c5f9 diff --git a/topics/week7_introducing_monads.mdwn b/topics/week7_introducing_monads.mdwn index 57afcb97..5f822866 100644 --- a/topics/week7_introducing_monads.mdwn +++ b/topics/week7_introducing_monads.mdwn @@ -184,7 +184,7 @@ has to obey the following Map Laws: >
join â (map join) == join â join> The first of these says that if you have a triply-boxed type, and you first merge the inner two boxes (with `map join`), and then merge the resulting box with the outermost box, that's the same as if you had first merged the outer two boxes, and then merged the resulting box with the innermost box. The second law says that if you take a box type and wrap a second box around it (with `mid`) and then merge them, that's the same as if you had instead mapped a second box around the elements of the original (with `map mid`, leaving the original box on the outside), and then merged them.
join â mid == id == join â map mid
> The Category Theorist would state these Laws like this, where `M` is the endofunctor that takes us from type `α` to type α
:
- >
μ â M(μ) == μ â μ+ >
μ â η = id == μ â M(η)
μ â M(μ) == μ â μHere are some interdefinitions: TODO
μ â η == id == μ â M(η)