1. Is there any value v that makes pcall(pcall, v) return
false as its status?
Answer: No. pcall(v) can never throw an error, no matter what v is.
It will just return false plus the error message. So pcall(pcall, v)
succeeds and returns true followed by the results of pcall(v).
2. Define a metamethod __mul that for complex numbers that multiplies
two complex numbers (or a complex number and a real).
Answer:
3. In the presence of metamethods, does a == b implies b == a? If not,
show as a counter-example an implementation of __eq where this does not hold.
Answer: No. One possible way:
4. Take the implementation of the Square class and make it extend the
Shape class in the same way that Circle does.
Answer:
5. Write a Stack class that implements a stack, with methods
push, pop, peek (to get the top without popping it) and isempty.