Last active
January 21, 2021 14:11
-
-
Save wess/917d0142b3c6079abb82327d251a71c7 to your computer and use it in GitHub Desktop.
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
def handle_call({:put, key, value}, _from, state) do | |
{:reply, :ok, Map.put(state, key, value)} | |
end | |
def handle_call({:get, key, value}, _from, state) do | |
{:reply, :ok, Map.get(state, key, value)} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment