Provide imperative implementation of filter in order to contrast with filter_with_reduce later.