What is a filter in programming?