Exercise 4.1: Implemented flatMap, orElse and filter with tests.