Created
March 9, 2019 00:06
-
-
Save aharpole/16ea1d16ffabac72198b2c317e611b83 to your computer and use it in GitHub Desktop.
new handle cast
This file contains hidden or 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
def handle_cast(:increment, state) do | |
new_state = Map.put(state, :value, &(&1 + state.increment_by)) | |
{:noreply, state} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment