Skip to content

Commit

Permalink
Add additional docs to Kernel.if/2 (#13120)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic authored Nov 21, 2023
1 parent 84283f7 commit a5ac8b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/elixir/lib/kernel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,9 @@ defmodule Kernel do
Provides an `if/2` macro.
This macro expects the first argument to be a condition and the second
argument to be a keyword list.
argument to be a keyword list. Similar to `case/2`, any assignment in
the condition will be available on both clauses, as well as after the
`if` expression.
## One-liner examples
Expand Down

0 comments on commit a5ac8b2

Please sign in to comment.