Skip to content

Commit 117667d

Browse files
author
José Valim
committed
Remove outdate docs and example
1 parent da45fde commit 117667d

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,7 +2232,7 @@ defmodule Kernel do
22322232
defmacro function(module, function, arity)
22332233
22342234
@doc """
2235-
Matches the given condition against the match clauses.
2235+
Matches the given expression against the match clauses.
22362236
22372237
## Examples
22382238
@@ -2242,9 +2242,9 @@ defmodule Kernel do
22422242
value -> value
22432243
end
22442244
2245-
In the example above, we compare `thing` with each given match clause and
2246-
evaluate the expression corresponding to the first clause that matches. If no
2247-
clause matches, an error is raised.
2245+
In the example above, we compare `thing` with each given match
2246+
clause and evaluate the expression corresponding to the first clause
2247+
that matches. If no clause matches, an error is raised.
22482248
22492249
Since Elixir variables can be assigned more than once, variables
22502250
in a match clause will always be assigned instead of matching with
@@ -2265,17 +2265,6 @@ defmodule Kernel do
22652265
end
22662266
22672267
The example above will actually fail because 10 does not match 1.
2268-
2269-
Finally, `case` accepts an `else:` branch as a fallback if none
2270-
of the clauses match:
2271-
2272-
case thing do
2273-
{ :selector, i, value } when is_integer(i) ->
2274-
value
2275-
_ ->
2276-
thing
2277-
end
2278-
22792268
"""
22802269
defmacro case(condition, blocks)
22812270

0 commit comments

Comments
 (0)