Q:

Doesn't append to head of list create a new list in erlang?

In erlang everything is immutable right? So how does appending an element to the head of list not create a new copy of the list where as using append creates a new copy each time?
Quote from erlang.org:
When recursing and building a list, it is important to ensure that you attach the new elements to the beginning of the list. In this way, you will build one list, not hundreds or thousands of copies of the growing result list.
Isn't traversing the linked list each time the reason for not appending at the end?

A:

Erlang uses single linked list for lists. Adding head doesn't modify tail. Imagine you have list T = [10, 50, 40]. Adding head is [20 | T] and a result looks like on the picture. You can see that [10, 50, 40] part is not altered.

