Implemented filter and flatMap.
Implemented filter using flatMap and a combine function which takes two
lists and a combiner function and returns a combined list.