...

/

Binaries

Binaries

Get familiar with the use of binaries in Elixir.

Binaries

The binary type represents a sequence of bits. A binary literal looks like << term,... >>. The simplest term is just a number from 0 to 255. The numbers are stored as successive bytes in the binary.

iex> b = << 1, 2, 3 >> 
<<1, 2, 3>>

iex>
...