Add implementation for CompoundPredicate.