Closed masuhar closed 6 years ago
The following code raises an "x is undefined" error at (seemingly) x.car in the else branch.
function append(x, y) { if (x===null) { return y; } else { return {car: x.car, cdr: append(x.cdr, y)}; } } var l1 = { car: 123, cdr: null }; var l2 = { car: 456, cdr: null }; var l1 = append(l1,l2);
The following code raises an "x is undefined" error at (seemingly) x.car in the else branch.