What does “:+” mean in Scala

On Scala Collections there is usually :+ and +:.
Both add an element to the collection. :+ appends +: prepends.
A good reminder is, : is where the Collection goes.

There is as well colA ++: colB to concat collections, where the : side collection determines the resulting type.
If a :++ exists, it is the same as ++. In both cases the left side collection determines the type of result.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)