SyntaxFix
Write A Post
Hire A Developer
Questions
This is similar to one of the answers but in different way :
scala> val x = List(1,2,3) x: List[Int] = List(1, 2, 3) scala> val y = x ::: 4 :: Nil y: List[Int] = List(1, 2, 3, 4)