diff --git a/lib/elixir/lib/map.ex b/lib/elixir/lib/map.ex index e6af533ac51..b759623f87e 100644 --- a/lib/elixir/lib/map.ex +++ b/lib/elixir/lib/map.ex @@ -709,10 +709,10 @@ defmodule Map do end @doc """ - Removes the value associated with `key` in `map` and returns the value - and the updated map, or it raises if `key` is not present. + Removes and returns the value associated with `key` in `map` alongside + the updated map, or raises if `key` is not present. - Behaves the same as `pop/3` but raises if `key` is not present in `map`. + Behaves the same as `pop/3` but raises a `KeyError` exception if `key` is not present in `map`. ## Examples