Is it true that applying the list1 ::: list2
operator to two lists corresponds to appending all of the contents of list1
to list2
?
scala> val a = List(1,2,3)
a: List[Int] = List(1, 2, 3)
scala> val b = List(4,5,6)
b: List[Int] = List(4, 5, 6)
scala> a:::b
res0: List[Int] = List(1, 2, 3, 4, 5, 6)
Is there any other use for this operator? I could not find anything on :::
in the Scala documentation and am wondering the extent of its formal name and use.