X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=topics%2F_week7_monads.mdwn;h=da0b0080792ed769b6e57c2acb0796651eedb1bc;hb=62abed25f0f396cd548b833805f4219cbdf79533;hp=75bc2051ee224c01dab42c54a733f32949becfdc;hpb=12c84449781c99ba26fa73fe86afff8b6408000d;p=lambda.git diff --git a/topics/_week7_monads.mdwn b/topics/_week7_monads.mdwn index 75bc2051..da0b0080 100644 --- a/topics/_week7_monads.mdwn +++ b/topics/_week7_monads.mdwn @@ -48,5 +48,23 @@ 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