Skip to content

Commit 6152ecb

Browse files
authored
Replace "dict" with "map" in Agents documentation page (#13874)
Dictionary is deprecated as per the documentation, and the example is using Map module.
1 parent e2556fd commit 6152ecb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/pages/mix-and-otp/agents.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ Before we move on to the next chapter, let's discuss the client/server dichotomy
187187

188188
```elixir
189189
def delete(bucket, key) do
190-
Agent.get_and_update(bucket, fn dict ->
191-
Map.pop(dict, key)
190+
Agent.get_and_update(bucket, fn map ->
191+
Map.pop(map, key)
192192
end)
193193
end
194194
```
@@ -200,9 +200,9 @@ This distinction is important. If there are expensive actions to be done, you mu
200200
```elixir
201201
def delete(bucket, key) do
202202
Process.sleep(1000) # puts client to sleep
203-
Agent.get_and_update(bucket, fn dict ->
203+
Agent.get_and_update(bucket, fn map ->
204204
Process.sleep(1000) # puts server to sleep
205-
Map.pop(dict, key)
205+
Map.pop(map, key)
206206
end)
207207
end
208208
```

0 commit comments

Comments
 (0)