From 6eebd26aed3867f64cc5178dc5aade197713b8f0 Mon Sep 17 00:00:00 2001
From: Jim Pryor
Date: Mon, 22 Nov 2010 05:26:47 -0500
Subject: [PATCH] assign7 tweak
Signed-off-by: Jim Pryor
---
assignment7.mdwn | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/assignment7.mdwn b/assignment7.mdwn
index 332b1187..0785c678 100644
--- a/assignment7.mdwn
+++ b/assignment7.mdwn
@@ -1,13 +1,19 @@
**The hints for problem 2 were being actively developed until Saturday morning. They're stable now. Remember you have a grace period until Sunday Nov. 28 to complete this homework.**
-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:
+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 remainder x y = x mod y;;
- 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. For example, you want to be able to calculate expressions like this:
-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 up to the middle of p. 16, in the terms we're now working with. You'll probably want to review [the lecture notes from this week's meeting](/week9).
+ (((some_long_computation / 12) + 5) - most_recent_remainder) * 2 - same_most_recent_remainder +1
+
+The remainder here is retrieved later than (and in addition to) the division it's the remainder of. It's also retrieved more than once. Suppose a given remainder remains retrievable until the next division is performed.
+
+
+
+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 up to the middle of p. 16, in the terms we're now working with. You'll probably want to review [the lecture notes from this week's meeting](/week9).
Some advice:
--
2.11.0