Что такое элегантный способ генерировать комбинации с префиксами в Scala?
"""
((pre_first, pre_second),
(pre_first, pre_second, thing1),
(pre_first, pre_second, thing2),
(pre_first, pre_second, thing3),
(pre_first, pre_second, thing1, thing2),
(pre_first, pre_second, thing1, thing3),
(pre_first, pre_second, thing2, thing3))
""".stripMargin
val prefixes = Seq("pre_first", "pre_second")
val things = Seq("thing1", "thing2", "thing3")