X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek7_introducing_monads.mdwn;h=718677e2bb61247dc69f97ffc017bd899609e1c6;hp=1911566abbeeee09f6ee0732a2c347386a8dc50d;hb=a31c51ce293108196a9f6ded726ac637ad52acb3;hpb=6475bb8430df17a74277b7835ba9f2b334a4761f;ds=sidebyside diff --git a/topics/week7_introducing_monads.mdwn b/topics/week7_introducing_monads.mdwn index 1911566a..718677e2 100644 --- a/topics/week7_introducing_monads.mdwn +++ b/topics/week7_introducing_monads.mdwn @@ -83,10 +83,17 @@ For instance, the following are Kleisli arrows: In the first, `P` has become `int` and `Q` has become `bool`. (The boxed type Q is bool). -Note that the left-hand schema `P` is permitted to itself be a boxed type. That is, where if `α list` is our box type, we can write the second type as: +Note that either of the schemas `P` or `Q` are permitted to themselves be boxed +types. That is, if `α list` is our box type, we can write the second type as: int -> int list +And also what the rhs there is a boxing of is itself a boxed type (with the same kind of box):, so we can write it as: + +int -> int + +We have to be careful though not to to unthinkingly equivocate between different kinds of boxes. + Here are some examples of values of these Kleisli arrow types, where the box type is `α list`, and the Kleisli arrow types are int -> int (that is, `int -> int list`) or int -> bool:
\x. [x]