Cascaded function call question

Start by looking at what foo() does, as @Tiemen suggested. It was defined previously: the code from question 2.3 calls the code from question 2.1…