When I saw the .toSeq, I was worried about materialization/memory.  I wonder if you could pass around a Scala Iterator and then call a collection which would turn an Iterator into something sorted.  

That *might* save an intermediate step.