Last active
July 26, 2017 11:00
-
-
Save PragTob/7ace9f03f09ec1f8e1397beef3cbd89d to your computer and use it in GitHub Desktop.
doctests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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