I wonder, if there is a standard and short way to convert Sequence to immutable Queue in Scala?
I did not find a magic method in documentation.
Right now I'm doing it like this:
def toQueue[A](s: Seq[A]): Queue[A] = s match {
case x +: xs => x +: toQueue(xs)
case _ => Queue.empty[A]
}
But is there anything more convenient?