From 4a51cec2c0b5f40a25ba46475e35964fd4cf3316 Mon Sep 17 00:00:00 2001 From: gregmarr Date: Tue, 4 Jun 2024 12:11:42 -0400 Subject: [PATCH] Typos in expressions.md on inspect expressions. Signed-off-by: gregmarr --- docs/cpp2/expressions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cpp2/expressions.md b/docs/cpp2/expressions.md index 2bf52f4c7..61ea71bd2 100644 --- a/docs/cpp2/expressions.md +++ b/docs/cpp2/expressions.md @@ -177,7 +177,7 @@ An `inspect expr -> Type = { /* alternatives */ }` expression allows pattern mat - `expr` is evaluated once. -- Each alternative is spelled `is C = statement;` and are evaluated in order. Each `is C` is evaluated if called with `expr is C`, and if it alternative evaluates to `#!cpp true`, then its `#!cpp = alternative;` body is used as the value of the entire `inspect` expression, and the meaning is the same as if the entire `inspect` expression had been written as just `#!cpp :Type = alternative;` — i.e., an unnamed object expression (aka 'temporary object') of type `Type` initialized with `alternative`. +- Each alternative is spelled `is C = statement;` and are evaluated in order. Each `is C` is evaluated as if called with `expr is C`, and if it evaluates to `#!cpp true`, then its `#!cpp = alternative;` body is used as the value of the entire `inspect` expression, and the meaning is the same as if the entire `inspect` expression had been written as just `#!cpp :Type = alternative;` — i.e., an unnamed object expression (aka 'temporary object') of type `Type` initialized with `alternative`. - A catchall `is _` is required.