From 1ba0ea60877efb8825488d5b3cde52543f179839 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Mon, 1 Nov 2010 15:25:40 -0400 Subject: [PATCH] Added assignmemnt 6 --- assignment6.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assignment6.mdwn b/assignment6.mdwn index 62d1c5c5..8c62e73d 100644 --- a/assignment6.mdwn +++ b/assignment6.mdwn @@ -2,10 +2,11 @@ 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 -the calculuation. That is, the desired behavior should be like this: +the calculation. That is, the desired behavior should be like this: - # lift ( + ) (lift ( / ) (unit 20) (unit 2)) (lift ( * ) (unit 2) (unit 3)) 0;; - - : int * int = (16, 3) + # lift ( + ) (lift ( / ) (unit 20) (unit 2)) + (lift ( * ) (unit 2) (unit 3)) 0;; + - : int * int = (16, 3) Here, `lift` is the function that uses `bind` to prepare an ordinary arithmetic operator (such as addition `( + )`, division `( / )`, or -- 2.11.0