diff options
author | Andrea Leopardi <an.leopardi@gmail.com> | 2018-08-29 11:14:29 +0200 |
---|---|---|
committer | Andrea Leopardi <an.leopardi@gmail.com> | 2018-08-29 11:14:29 +0200 |
commit | 289fd2ddb2926b2d0aa4542e9120202d421d84a7 (patch) | |
tree | 57e9bf4b4bd3a52f108c6470af4a917b707e79e3 | |
parent | 9d105ba4d655ecec00b10d35336a15c6b6d9922e (diff) | |
download | elixir-al/else-in-def-docs.tar.gz |
Document that "else" can be used directly in function definitionsal/else-in-def-docs
[ci skip]
Related to #8146.
-rw-r--r-- | lib/elixir/lib/kernel.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex index 6dbcc5dbb..085d55927 100644 --- a/lib/elixir/lib/kernel.ex +++ b/lib/elixir/lib/kernel.ex @@ -3994,10 +3994,10 @@ defmodule Kernel do end #=> warning: the underscored variable "_bar" is used after being set - ## rescue/catch/after + ## `rescue`/`catch`/`after`/`else` - Function bodies support `rescue`, `catch` and `after` as `Kernel.SpecialForms.try/1` - does. The following two functions are equivalent: + Function bodies support `rescue`, `catch`, `after`, and `else` as `Kernel.SpecialForms.try/1` + does. For example, the following two functions are equivalent: def format(value) do try do |