Kernel.sigil_w
You're seeing just the macro
sigil_w
, go back to Kernel module for more information.
Handles the sigil ~w
for list of words.
It returns a list of "words" split by whitespace. Character unescaping and interpolation happens for each word.
Modifiers
s
: words in the list are strings (default)a
: words in the list are atomsc
: words in the list are charlists
Examples
iex> ~w(foo #{:bar} baz)
["foo", "bar", "baz"]
iex> ~w(foo #{" bar baz "})
["foo", "bar", "baz"]
iex> ~w(--source test/enum_test.exs)
["--source", "test/enum_test.exs"]
iex> ~w(foo bar baz)a
[:foo, :bar, :baz]