How to construct function for applying filter?

How to construct function for applying filter?

tech