Possible Duplicate:
Scala list concatenation, ::: vs ++
In Scala, say I have two lists
scala> val oneTwo = List(1,2)
oneTwo: List[Int] = List(1, 2)
and
scala> val threeFour = List(3,4)
threeFour: List[Int] = List(3, 4)
I can concatenates Lists by doing:
scala> oneTwo ::: threeFour
res30: List[Int] = List(1, 2, 3, 4)
Or
scala> oneTwo ++ threeFour
res31: List[Int] = List(1, 2, 3, 4)
What is the difference between both approaches?
Thanks.