cons is used to “construct” a new object, based on two values.
the parts are called cons pairs, cons cells etc.
More info here: https://en.wikipedia.org/wiki/Cons
Came across the term in the past, but never dug into it. Just recently I started reading “The little Elixir and OTP Guidebook” and that’s were I got a better grasp of the term and usage, e.g. [1 | 2] the | represents the cons operator. In elixir it can be used for constructing, destructuring and pattern matching (e.g. in lists, but not only).
Chris