Integer.digits

You're seeing just the function digits, go back to Integer module for more information.
Link to this function

digits(integer, base \\ 10)

View Source

Specs

digits(integer(), pos_integer()) :: [integer(), ...]

Returns the ordered digits for the given integer.

An optional base value may be provided representing the radix for the returned digits. This one must be an integer >= 2.

Examples

iex> Integer.digits(123)
[1, 2, 3]

iex> Integer.digits(170, 2)
[1, 0, 1, 0, 1, 0, 1, 0]

iex> Integer.digits(-170, 2)
[-1, 0, -1, 0, -1, 0, -1, 0]