Published on

cons is used to “construct” a new object, based on two values.

the parts are called cons pairs, cons cells etc.

More info here:

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).

Here, have a slice of pizza 🍕