Partition: pass key and object to predicate given context