Skip to content

Instantly share code, notes, and snippets.

@alexandreservian
Created March 24, 2020 18:23
Show Gist options
  • Save alexandreservian/3305af98abe28074deb0da78118b6754 to your computer and use it in GitHub Desktop.
Save alexandreservian/3305af98abe28074deb0da78118b6754 to your computer and use it in GitHub Desktop.
Usando StackNormal no iex
iex> alias ProcessInElixir.StackNormal
ProcessInElixir.StackNormal
iex> {:ok, pid} = StackNormal.start_link
{:ok, #PID<0.326.0>}
iex> StackNormal.push pid, "Japão"
{:push, "Japão"}
iex> StackNormal.push pid, "Alemanha"
{:push, "Alemanha"}
iex> StackNormal.push pid, "Brasil"
{:push, "Brasil"}
iex> StackNormal.pop pid
"Brasil"
iex> StackNormal.show pid
["Japão", "Alemanha"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment