source-academy / sicp

XML sources of SICP and SICP JS, and support for generating Interactive SICP JS, PDF, e-book and comparison editions

Home Page:https://sourceacademy.org/sicpjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solution to Exercise 3.12

jonathantorres opened this issue · comments

pointers

  • After the call to const z = append(x, y), tail(x) = ["b", null]. Since append creates a new copy of x with the elements of y.

pointers

  • After the call to const w = append_mutator(x, y), tail(x) = ["b", ["c", ["d", null]]]. Since append_mutator sets the tail of the last pair of x to y.