From c0ed77c50dc7ac59ba81f3e07fc0e667e0cef843 Mon Sep 17 00:00:00 2001 From: Yorkin Date: Mon, 16 Dec 2024 17:34:15 +0800 Subject: [PATCH] add more detail for match expr --- .../chapter3_pattern_matching/lesson2_let_and_match/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonbit-tour/tour/chapter3_pattern_matching/lesson2_let_and_match/index.md b/moonbit-tour/tour/chapter3_pattern_matching/lesson2_let_and_match/index.md index dc6f69ab..30874199 100644 --- a/moonbit-tour/tour/chapter3_pattern_matching/lesson2_let_and_match/index.md +++ b/moonbit-tour/tour/chapter3_pattern_matching/lesson2_let_and_match/index.md @@ -14,7 +14,7 @@ You may notice that there is a partial match warning because the resource can al The `count` function traverse the input `res` recursively and return the count of `Image` and `TextFile`, using match expression. -Match expressions have *first match semantics*. They will try to find the first matching pattern from the first case to the last case and execute the corresponding expression. +Match expressions have *first match semantics*. They will try to find the first matching pattern from the first case to the last case and execute the corresponding expression. If no pattern matches, the program will abort. The match expression has a `Int` return value because all the case result in same value type `Int`.