Merge pull request #3876 from dwtong/patch-1

[elixir/en] Use correct pattern matching for Elixir
This commit is contained in:
Max Schumacher 2020-08-17 15:06:53 +02:00 committed by GitHub
commit b15906a5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,7 +439,7 @@ self() #=> #PID<0.27.0>
# Create an agent with `Agent.start_link`, passing in a function # Create an agent with `Agent.start_link`, passing in a function
# The initial state of the agent will be whatever that function returns # 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 # `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 # Whatever that `fn` returns is what you'll get back