I\'ve recently started learning scala, and I\'ve come across the :: (cons) function, which prepends to a list.
In the book \"Programming in Scala\" it state
Most functional languages prominently figure a singly-linked-list data structure, as it's a handy immutable collection type. When you say "list" in a functional language, that's typically what you mean (a singly-linked list, usually immutable). For such a type, append is O(n) whereas cons is O(1).