partition function

Patitions an object into different sets