The filter is a def, so we would need to supply the constructor for a per usage filter function. Not sure I see the gain in the complexity?