Exercise 3.18: map
Exercise 3.19: filter