> let leq? = \l r. zero? (sub l r) in
> ...
- > Here is another solution. Jim crafted this particular implementation, but like a great deal of the CS knowledge he's gained over the past eight years, Oleg Kiselyov pointed the way.
+ > Here is another solution. Jim crafted this particular implementation, but like a great deal of the CS knowledge he's gained over the past eight years, Oleg Kiselyov pointed the way. <!-- see "lambda-calc-opposites.txt" at http://okmij.org/ftp/Computation/lambda-calc.html#neg -->
> let leq? = (\base build consume. \l r. r consume (l build base) fst)
> ; where base is
25. For each of the above translations, how many `I`s are there? Give a rule for describing what each `I` corresponds to in the original lambda term.
+ This generalization depends on you omitting the translation rule:
+
+ 6. @a(Xa) = X if a is not in X
+
+ > With that shortcut rule omitted, then there turn out to be one `I` in the result corresponding to each occurrence of a bound variable in the original term.
+
Evaluation strategies in Combinatory Logic
------------------------------------------
<OL start=30>
<LI><code>(\x. x (\y. y x)) (v w) ~~> v w (\y. y (v w))</code>
<LI><code>(\x. x (\x. y x)) (v w) ~~> v w (\x. y x)</code>
-<LI><code>(\x. x (\y. y x)) (v x) ~~> v w (\y. y (v x))</code>
-<LI><code>(\x. x (\y. y x)) (v y) ~~> v w (\u. u (v y))</code>
+<LI><code>(\x. x (\y. y x)) (v x) ~~> v x (\y. y (v x))</code>
+<LI><code>(\x. x (\y. y x)) (v y) ~~> v y (\u. u (v y))</code>
<LI><code>(\x y. x y y) u v ~~> u v v</code>
<LI><code>(\x y. y x) (u v) z w ~~> z (u v) w</code>