Scala List Examples
My notes on scala.lists :
– scala.list is different from java.util.List
– scala.list is ‘immutable sequence of objects’
– scala list doesn’t support append operation
Some Scala list operators and methods:
::: – for list concatenation
scala > val oneTwo = List(1, 2)
scala > val threeFour = List(3, 4)
scala > val oneTwoThreeFour = oneTwo ::: threeFour
:: – cons operator – prepends …