X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment2.mdwn;h=c60f50e8892777485e3775fe4d5b30ce0c42edf9;hp=65fe479ccb1357c6711e689115b38cefb8df757b;hb=2c3b570cee9e45d3a826a38871fbcbd9bf356d46;hpb=8aa265f15b21b2f78be32a940f8df98720387c1b 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: