@@ -2232,7 +2232,7 @@ defmodule Kernel do
2232
2232
defmacro function(module, function, arity)
2233
2233
2234
2234
@doc """
2235
- Matches the given condition against the match clauses.
2235
+ Matches the given expression against the match clauses.
2236
2236
2237
2237
## Examples
2238
2238
@@ -2242,9 +2242,9 @@ defmodule Kernel do
2242
2242
value -> value
2243
2243
end
2244
2244
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.
2248
2248
2249
2249
Since Elixir variables can be assigned more than once, variables
2250
2250
in a match clause will always be assigned instead of matching with
@@ -2265,17 +2265,6 @@ defmodule Kernel do
2265
2265
end
2266
2266
2267
2267
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
-
2279
2268
"""
2280
2269
defmacro case(condition, blocks)
2281
2270
0 commit comments