Answer to Question m4

Type error. 'new List' has type List*. It cannot be stored into a variable of type List.

Notation. [ ] is not C++ notation.

Incorrect. Suppose A is empty and B is [1,2,3]. Then this function computes C = merge([1,2,3], [2,3]). If that merge is done correctly, the answer is [1,2,2,3,3]. The correct answer to merge(A,B) is [1,2,3].

Incorrect. What if both A and B are NULL? Then the function computes tail(B), which causes a memory fault.