Skip to content

Instantly share code, notes, and snippets.

@elixirplayground
Created July 29, 2015 06:11
Show Gist options
  • Save elixirplayground/1fa43a013af480a20ce3 to your computer and use it in GitHub Desktop.
Save elixirplayground/1fa43a013af480a20ce3 to your computer and use it in GitHub Desktop.
elixirplayground.com code share
IO.inspect {:ok, agent} = Agent.start_link fn -> [] end
IO.inspect Agent.update(agent, fn list -> ["eggs"|list] end)
IO.inspect Agent.get(agent, fn list -> list end)
IO.inspect Agent.stop(agent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment