From: Jim Pryor Date: Thu, 18 Nov 2010 17:34:51 +0000 (-0500) Subject: assignment7 tweaks X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=535418d6237eee421ceae64d611737b4c481fc97 assignment7 tweaks Signed-off-by: Jim Pryor --- diff --git a/assignment7.mdwn b/assignment7.mdwn index 68ce97a1..93b1ccff 100644 --- a/assignment7.mdwn +++ b/assignment7.mdwn @@ -1,11 +1,10 @@ -1. Make sure that your operation-counting monad from [[assignment6]] is working. Modify it so that instead of counting operations, it keeps track of the last remainder of any integer division. You can help yourself to any of the functions: +1. Make sure that your operation-counting monad from [[assignment6]] is working. Modify it so that instead of counting operations, it keeps track of the last remainder of any integer division. You can help yourself to the functions: let div x y = x / y;; - let mod x y = x mod y;; - let divmod x y = (div x y, mod x y);; + let remainder x y = x mod y;; - you like. Write a monadic operation that enables you to retrieve the last-saved remainder, at any arbitrary later point in the computation. + Write a monadic operation that enables you to retrieve the last-saved remainder, at any arbitrary later point in the computation. 2. For the next assignment, read the paper [Coreference and Modality](/coreference-and-modality.pdf). Your task will be to re-express the semantics they offer in the terms we're now working with. You'll probably want to review the lecture notes from this week's meeting, which we haven't yet been able to post. We will do that soon. In the meantime, you can get started reading the paper.