X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment6.mdwn;h=a31cbf8a8b2ac51ea3a27701892f37d6be423db9;hp=30763c1a786c93e7ac4d039942a7f69865623849;hb=a1a38a5cfaede25b7e6299cac3275e1ccfd9b2db;hpb=16d60ccef54c35bf297e46ed0862da0bcd6fa475 diff --git a/assignment6.mdwn b/assignment6.mdwn index 30763c1a..a31cbf8a 100644 --- a/assignment6.mdwn +++ b/assignment6.mdwn @@ -1,4 +1,4 @@ -1. **Build a state monad.** Based on the division by zero monad, +1. **Build a State monad.** Based on the division by zero monad, build a system that will evaluate arithmetic expressions. Instead of returning a simple integer as a result, it will deliver the correct answer along with a count of the number of operations performed during @@ -24,6 +24,9 @@ your solution). You'll need to define a computation monad type, unit, bind, and lift2. We encourage you to consider this hint: [[hints/Assignment 6 Hint 1]]. + See our [commentary](/hints/assignment_6_commentary) on your solutions. + + 2. Prove that your monad satisfies the monad laws. First, give examples illustrating specific cases in which the monad laws are obeyed, then explain (briefly, not exhaustively) why the laws hold in