With second version using filter, reduce, map, and list comprehension.