Use the ~w
sigil to generate lists of strings:
iex> ~w(a b c)
["a", "b", "c"]
Append the a
option to generate a list of atoms:
iex> ~w(a b c)a
[:a, :b, :c]
Use the ~w
sigil to generate lists of strings:
iex> ~w(a b c)
["a", "b", "c"]
Append the a
option to generate a list of atoms:
iex> ~w(a b c)a
[:a, :b, :c]