X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=cps.mdwn;fp=cps.mdwn;h=9617dad025480f2d8698c5c08b0b9f4d12d2e6d9;hb=07dd60fffbc9065d4e68092149bd1b37024e9b8b;hp=6668b48ce1bcde7c63aed5a13b113c376e4bc884;hpb=339a5442b568742f36ddab4a44f77cfb26b609a2;p=lambda.git diff --git a/cps.mdwn b/cps.mdwn index 6668b48c..9617dad0 100644 --- a/cps.mdwn +++ b/cps.mdwn @@ -180,8 +180,8 @@ Questions and exercises: 1. Prove that {(\x.y)(ww)} does not terminate. -2. Why is the CBN xform for variables `[x] = x' instead of something -involving kappas? +2. Why is the CBN xform for variables `[x] = x` instead of something +involving kappas (i.e., `k`'s)? 3. Write an Ocaml function that takes a lambda term and returns a CPS-xformed lambda term. You can use the following data declaration: @@ -196,6 +196,10 @@ CBV) more completely and carefully. 5. What happens (in terms of evaluation order) when the application rule for CBV CPS is changed to `{MN} = \k.{N}(\n.{M}(\m.mnk))`? +6. A term and its CPS xform are different lambda terms. Yet in some +sense they "do" the same thing computationally. Make this sense +precise. + Thinking through the types --------------------------