From: jim Date: Fri, 20 Mar 2015 17:34:11 +0000 (-0400) Subject: restore Chris's double boxes X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=a31c51ce293108196a9f6ded726ac637ad52acb3 restore Chris's double boxes --- 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]