X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2F_week7_monads.mdwn;h=3f2955e9f1fb6ebe476c4eee917a49d877652e1e;hp=fc6b41536b1f43cb94b5389fe114d41af5ca2f7d;hb=cb9c6590ec969e34555d9c9f56758c3e6c252ce5;hpb=7803c02633a9ff916c86b17f868161317be27bcc diff --git a/topics/_week7_monads.mdwn b/topics/_week7_monads.mdwn index fc6b4153..3f2955e9 100644 --- a/topics/_week7_monads.mdwn +++ b/topics/_week7_monads.mdwn @@ -48,5 +48,27 @@ We'll often write box types as a box containing the value of the free type variable. So if our box type is `α List`, and `α == Int`, we would write -Int
+
Int
+ +for the type of a boxed Int. + +At the most general level, we'll talk about *Kleisli arrows*: + +P ->
Q
+ +A Kleisli arrow is the type of a function from objects of type P to +objects of type box Q, for some choice of type expressions P and Q. +For instance, the following are arrows: + +Int ->
Bool
+ +Int List ->
Int List
+ +Note that the left-hand schema can itself be a boxed type. That is, +if `α List` is our box type, we can write the second arrow as + +
Int
+-> +
Int