Exercise 2.85 - Implement apply-generic