Skip to content

Commit

Permalink
Add docs to Kernel.if/2
Browse files Browse the repository at this point in the history
  • Loading branch information
dvic committed Nov 20, 2023
1 parent df66d88 commit 6919d74
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 statement.
## One-liner examples
Expand Down

0 comments on commit 6919d74

Please sign in to comment.