X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=topics%2Fweek7_introducing_monads.mdwn;h=61012d55634d6d847c556a31f8735474a4e4fcd8;hb=3d276dedb3ccde00a014e49ced1e438d82f4bcef;hp=6bfa13ce437649e174a20344c61523b52b69563b;hpb=6aeee2346afa241a8fc2f40a7a828d8e0607a7b7;p=lambda.git diff --git a/topics/week7_introducing_monads.mdwn b/topics/week7_introducing_monads.mdwn index 6bfa13ce..61012d55 100644 --- a/topics/week7_introducing_monads.mdwn +++ b/topics/week7_introducing_monads.mdwn @@ -56,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`. @@ -105,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 @@ -371,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