Re:Not Growing a Language
by AnimalMuppet on Saturday April 03, 2021 @06:38PM
(#26685383)
I could even see + on collections: "Add all the elements of this collection to that collection."
[ Parent
| on HN ]
Re:Not Growing a Language
by erik_seaberg on Saturday April 03, 2021 @07:11PM
(#26685571)
Scala 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.