Can we move case(partitionIndex, iter) to the previous line, and rename partitionIndex to part? Then we don't have to do the extra indents.