X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=week7.mdwn;h=d3e4b47d83a55932689897ddcae492bbb277f074;hp=78a41506cc48e7388941bb4a28554d501107d6c0;hb=1690318d1a76220c9524ae083bf101e349bffac0;hpb=5e53f11286531aec59bd3c665522ad5776d4188d diff --git a/week7.mdwn b/week7.mdwn index 78a41506..d3e4b47d 100644 --- a/week7.mdwn +++ b/week7.mdwn @@ -6,6 +6,10 @@ Towards Monads: Safe division [This section used to be near the end of the lecture notes for week 6] +We begin by reasoning about what should happen when someone tries to +divide by zero. This will lead us to a general programming technique +called a *monad*, which we'll see in many guises in the weeks to come. + Integer division presupposes that its second argument (the divisor) is not zero, upon pain of presupposition failure. Here's what my OCaml interpreter says: