Core concept
val l = 1 :: 2 :: 3 :: Nil
l.head // 1
l.tail // List(2, 3)Advertisement
How it works
Not for indexed access. Append is O(n). Use Vector for random access.
Advertisement
Trade-offs + gotchas
Recursive algorithms. Head-heavy processing.