Its hard for me to even put into words what I mean to ask, so let me give an example.
I have a Seq
like so, where Occurrence
is a case class:
Seq(
Seq(Occurrence1, Occurrence2, Occurrence3),
Seq(Occurrence2, Occurrence3, Occurrence1),
Seq(Occurrence4),
Seq(Occurrence5, Occurrence6),
Seq(Occurrence6, Occurrence5)
)
Which I am trying to condense to look like:
Seq(
Seq(Occurrence1, Occurrence2, Occurrence3),
Seq(Occurence4),
Seq(Occurrence5, Occurrence6)
)
Is there a collections API that allows me to do this? I'd like to sort the items within that Seq