Correct myGroupBy to compare the head of each new list instead of every overlapping pair.