Skip to content

Instantly share code, notes, and snippets.

@PragTob
Last active July 26, 2017 11:00
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 PragTob/7ace9f03f09ec1f8e1397beef3cbd89d to your computer and use it in GitHub Desktop.
Save PragTob/7ace9f03f09ec1f8e1397beef3cbd89d to your computer and use it in GitHub Desktop.
doctests
@doc """
## Examples
iex> {:ok, pid} = Agent.start_link(fn -> 42 end)
iex> Agent.get_and_update(pid, fn(state) -> {state, state + 1} end)
42
iex> Agent.get(pid, fn(state) -> state end)
43
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment