partition function

Partition a vector in two