Add solutions for 8: higher order functions.