Allow using functions as treatment predicates.