Here are the fully expand steps:
0) at the beginning , we get expression ``(car (cons 1 2))``
1) replace ``cons`` using ``(lambda (m) (m x y))`` , we get ``(car (lambda (m) (m x y))`` .
2) replace ``car`` using ``(lambda (z) (z (lambda (p q) p)``, we get :
((lambda (z) (z (lambda (p q) p))
__(lambda (m) (m 1 2)))
3) replace ``z`` using ``(lambda (m) (m 1 2))`` , we get :
((lambda (m) (m 1 2))
__(lambda (p q) p))
4) replace ``m`` using ``(lambda (p q) p)`` , we get :
((lambda (p q) p)
__1 2)
5) replace ``p`` and ``q`` using ``1`` and ``2, we get :
(lambda (1 2) 1)
6) finally, the answer of the expression is ``1``
原文:http://www.cnblogs.com/wizzhangquan/p/4404845.html