Chapter 2: Problem 4
Here is an alternative procedural representation of pairs. For this representation, verify that (car (cons \(\mathrm{x} \mathrm{y}\) )) yields \(\mathrm{x}\) for any objects \(\mathrm{x}\) and \(\mathrm{y}\). (define (cons \(\mathrm{x} \mathrm{y}\) ) \(\quad(\) lambda \((\mathrm{m})(\mathrm{m} \mathrm{x} \mathrm{y})))\) \((\) define \((\mathrm{car} \mathrm{z})\) \((\mathrm{z}(\) lambda \((\mathrm{p} \mathrm{q}) \mathrm{p})))\) What is the corresponding definition of cdr? (Hint: To verify that this works, make use of the substitution model of section 1.1.5.)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.