summaryrefslogtreecommitdiffhomepage
path: root/elixir.html.markdown
diff options
context:
space:
mode:
authorDan Tong <dwtong@users.noreply.github.com>2020-03-03 14:36:47 +1300
committerGitHub <noreply@github.com>2020-03-03 14:36:47 +1300
commit6f9362b080b3b7ef2728a631acd3f5417382db4f (patch)
tree8b1727d39cdc82ae99d7aee52516b84b27b22680 /elixir.html.markdown
parent9e975a8dcf821ea385742cfe9088d72388d08e43 (diff)
Use correct pattern matching for Elixir
Diffstat (limited to 'elixir.html.markdown')
-rw-r--r--elixir.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/elixir.html.markdown b/elixir.html.markdown
index 0b717ca6..49505128 100644
--- a/elixir.html.markdown
+++ b/elixir.html.markdown
@@ -439,7 +439,7 @@ 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