X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=topics%2Fweek7_introducing_monads.mdwn;h=61012d55634d6d847c556a31f8735474a4e4fcd8;hb=3d276dedb3ccde00a014e49ced1e438d82f4bcef;hp=c8abd3b2a802d9c51f7a85ae06768100138be588;hpb=6f77d2af455472af945dd882e429f5dc1e3ad2d9;p=lambda.git diff --git a/topics/week7_introducing_monads.mdwn b/topics/week7_introducing_monads.mdwn index c8abd3b2..61012d55 100644 --- a/topics/week7_introducing_monads.mdwn +++ b/topics/week7_introducing_monads.mdwn @@ -1,9 +1,6 @@ -sample underlined text, and then box2 and then ul end. - - Introducing Monads ================== @@ -59,7 +56,7 @@ type variable instantiates to. So if our box type is `α list`, and `α` instant int -for the type of a boxed `int`. (We'll fool with the markup to make this show a genuine box later; for now it will just display as underlined.) +for the type of a boxed `int`. @@ -108,7 +105,7 @@ Here are the types of our crucial functions, together with our pronunciation, an =<< or mdnib (flip mbind) (Q) -> (Q -> R) -> (R) -join: P -> P +join: P -> P The menagerie isn't quite as bewildering as you might suppose. Many of these will @@ -374,7 +371,7 @@ Compare the new definitions of `safe_add3` and `safe_div3` closely: the definiti for `safe_add3` shows what it looks like to equip an ordinary operation to survive in dangerous presupposition-filled world. Note that the new definition of `safe_add3` does not need to test whether its arguments are -None values or real numbers---those details are hidden inside of the +`None` values or real numbers---those details are hidden inside of the `bind` function. Note also that our definition of `safe_div3` recovers some of the simplicity of