If the conditional is empty vs non-empty, perhaps we can check sizes of the incoming annotations instead of iterating through all of them in a forcomp, making a long sequence & then checking if its empty or not. Should probably define Seq("cs", "cr", "ss", "sr") as a private val inside object Span.