Skip to content

Instantly share code, notes, and snippets.

@bobo52310
Created July 28, 2016 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobo52310/31f1bb146e4fcc4025c115ead2792d4f to your computer and use it in GitHub Desktop.
Save bobo52310/31f1bb146e4fcc4025c115ead2792d4f to your computer and use it in GitHub Desktop.
elixir pipeline for enumeration
:inet.getif()
|> elem(1)
|> hd()
|> elem(1)
|> Tuple.to_list
|> Enum.join(".")
|> IO.inspect
# ip1 = :inet.getif()
# ip1 = elem(ip1, 1)
# ip1 = hd(ip1)
# ip1 = elem(ip1, 1)
# ip1 = Tuple.to_list(ip1)
# ip1 = Enum.join(ip1, ".")
# IO.inspect(ip1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment