Skip to content

Instantly share code, notes, and snippets.

@ryohji
Created July 4, 2019 15:46
Show Gist options
  • Save ryohji/1860fa54cbc706c80b551410ee0aba76 to your computer and use it in GitHub Desktop.
Save ryohji/1860fa54cbc706c80b551410ee0aba76 to your computer and use it in GitHub Desktop.
計算機プログラムの構造と解釈 第二版 問題 2.4

問題 2.4

これは対のもう一つの手続き表現である.この表現について任意のオブジェクト xy に対し, (car (cons x y))x を生じることを証明せよ.

(define (cons x y)
 (lambda (m) (m x y)))

(define (car z)
 (z (lambda (p q) p)))

これに対する cdr の定義は何か.(ヒント:これが働くことを調べるには, 1.1.5 節の置換えモデルを利用せよ.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment