From 1788de56a0d68d3f931b8aaa13f778551a6b7d68 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 22 Sep 2021 14:08:37 -0700 Subject: [PATCH] Update syntax-if-expression.md Add a note that only one expression is evaluated in `if-expr`. --- rfcs/syntax-if-expression.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/syntax-if-expression.md b/rfcs/syntax-if-expression.md index 3d2dfce..c900409 100644 --- a/rfcs/syntax-if-expression.md +++ b/rfcs/syntax-if-expression.md @@ -20,7 +20,7 @@ To solve these problems, we propose introducing a first-class ternary conditiona Concretely, the `if-then-else` expression must match `if then else `; it can also contain an arbitrary number of `elseif` clauses, like `if then elseif then else `. Note that in either case, `else` is mandatory. -The result of the expression is the then-expression when condition is truthful (not `nil` or `false`) and else-expression otherwise. +The result of the expression is the then-expression when condition is truthful (not `nil` or `false`) and else-expression otherwise. Only one of the two possible resulting expressions is evaluated. Example: