Solve exercise 4.16, add simultaneous evaluation of internal definitions