summaryrefslogtreecommitdiffhomepage
path: root/elixir.html.markdown
diff options
context:
space:
mode:
authorJonah Hirsch <jonahwh@gmail.com>2017-03-15 02:06:31 -0700
committerven <vendethiel@hotmail.fr>2017-03-15 10:06:31 +0100
commit2b4fe43f7187fcc3df0772a36f4264269f98c5c1 (patch)
tree125dc32eb0f4cb336d76b4214c1f1978cfbdf5c8 /elixir.html.markdown
parent56275f78b21fbda664b0214bd108bdcf3550e735 (diff)
Fix some missing double quotes in Agent section (#2682)
Diffstat (limited to 'elixir.html.markdown')
-rw-r--r--elixir.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/elixir.html.markdown b/elixir.html.markdown
index 63b7aef2..9dfffc41 100644
--- a/elixir.html.markdown
+++ b/elixir.html.markdown
@@ -433,11 +433,11 @@ self() #=> #PID<0.27.0>
# Create an agent with `Agent.start_link`, passing in a function
# The initial state of the agent will be whatever that function returns
-{ok, my_agent} = Agent.start_link(fn -> ["red, green"] end)
+{ok, my_agent} = Agent.start_link(fn -> ["red", "green"] end)
# `Agent.get` takes an agent name and a `fn` that gets passed the current state
# Whatever that `fn` returns is what you'll get back
-Agent.get(my_agent, fn colors -> colors end) #=> ["red, "green"]
+Agent.get(my_agent, fn colors -> colors end) #=> ["red", "green"]
# Update the agent's state the same way
Agent.update(my_agent, fn colors -> ["blue" | colors] end)