Turn top-level predicates into lambdas.