Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/elixir/lib/kernel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3524,8 +3524,7 @@ defmodule Kernel do
end

@doc """
A convenience macro that checks if the right side (an expression) matches the
left side (a pattern).
A convenience macro that checks if the result of `expression` matches `pattern`.

## Examples

Expand Down Expand Up @@ -3603,7 +3602,7 @@ defmodule Kernel do
#=> (MatchError) no match of right hand side value: %{x: 1, y: 2}

"""
defmacro match?(pattern, expr) do
defmacro match?(pattern, expression) do
success =
quote do
unquote(pattern) -> true
Expand All @@ -3614,7 +3613,7 @@ defmodule Kernel do
_ -> false
end

{:case, [], [expr, [do: success ++ failure]]}
{:case, [], [expression, [do: success ++ failure]]}
end

@doc """
Expand Down