3 ms·
I could even see + on collections: "Add all the elements of this collection to that collection."
by AnimalMuppet 6y ago
I could even see + on collections: "Add all the elements of this collection to that collection."
- erik_seaberg 6y agoScala used + for an element and ++ for another collection scala> 1 +: List(2, 3) ++: List(4, 5) :+ 6 res0: List[Int] = List(1, 2, 3, 4, 5, 6) where +: is right-associative and implemented by the list rather than the element.