From a5ac8b2b2ca5093aebfa68db857e464297d2f72c Mon Sep 17 00:00:00 2001 From: Damir Vandic Date: Tue, 21 Nov 2023 09:26:04 +0100 Subject: [PATCH] Add additional docs to Kernel.if/2 (#13120) --- lib/elixir/lib/kernel.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex index 18e0249871f..3383a74ad29 100644 --- a/lib/elixir/lib/kernel.ex +++ b/lib/elixir/lib/kernel.ex @@ -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