Massive Mobility interview question

Using closure write multiple filtration code for the data