Skip to content

Instantly share code, notes, and snippets.

@aharpole
Created March 9, 2019 00:08
Show Gist options
  • Save aharpole/dc63167506786ea7485337c18e6771a2 to your computer and use it in GitHub Desktop.
Save aharpole/dc63167506786ea7485337c18e6771a2 to your computer and use it in GitHub Desktop.
handle cast map
def handle_cast(:increment, %{value: value, increment_by: increment_by}) do
{:ok, %{value: value + increment_by}}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment