Document partitions
Add tests for partitions()