Add a different implementation for partitioning a sequence.