The preceding two chapters described the basics of lists and dictionaries. But you may have noticed that, although I talked about them as types, I didn’t really say what I meant.
The first thing to understand is that the primitive data types are not necessarily the same as the types they can represent.
For example, a primitive Elixir list is just an ordered list of values. We can use the […] literal to create a list, and the | operator to deconstruct and build lists.
Then there’s another layer. Elixir has the List module, which provides a set of functions that operate on lists. Often these functions simply use recursion and the | operator to add this extra functionality.
In my mind, there’s a difference between ...