X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment6.mdwn;h=7d10ab58e18dd1fb60386525465ed06028a1ff9e;hp=62d1c5c54366c3e10b6163226b8a2686bfc485be;hb=5eafd339063de2c77f30a7c9aea2ed1c09bc7673;hpb=1487bf1e23d780ed6abd773c7650115cce1f831a;ds=sidebyside diff --git a/assignment6.mdwn b/assignment6.mdwn index 62d1c5c5..7d10ab58 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