From: Jim Pryor Date: Mon, 20 Sep 2010 11:12:47 +0000 (-0400) Subject: assignment 2 tweak X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=2c3b570cee9e45d3a826a38871fbcbd9bf356d46;hp=8aa265f15b21b2f78be32a940f8df98720387c1b assignment 2 tweak Signed-off-by: Jim Pryor --- diff --git a/assignment2.mdwn b/assignment2.mdwn index 65fe479c..c60f50e8 100644 --- a/assignment2.mdwn +++ b/assignment2.mdwn @@ -56,6 +56,7 @@ The `junk` in `extract-head` is what you get back if you evaluate: As we said, the predecessor and the extract-tail functions are harder to define. We'll just give you one implementation of these, so that you'll be able to test and evaluate lambda-expressions using them in Scheme or OCaml.
predecesor ≡ (\shift n. n shift (make-pair zero junk) get-second) (\pair. pair (\fst snd. make-pair (successor fst) fst))
+
 extract-tail ≡ (\shift lst. lst shift (make-pair empty junk) get-second) (\hd pair. pair (\fst snd. make-pair (make-list hd fst) fst))
The `junk` is what you get back if you evaluate: