Exercise 5.12: Implemented map, take and takeWhile in terms of unfold.
Exercise 5.12: Use a pattern label according to the given solution for reuse of the value rather than reconstructing it.