From 0338ccef244375407cd73eb364bf0014476776de Mon Sep 17 00:00:00 2001 From: Alireza Habibi Date: Sat, 10 Oct 2020 21:52:20 +0330 Subject: [PATCH] Update list-patterns.md --- proposals/list-patterns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/list-patterns.md b/proposals/list-patterns.md index 5c757b7c623..55ff448e88c 100644 --- a/proposals/list-patterns.md +++ b/proposals/list-patterns.md @@ -109,7 +109,7 @@ All multi-dimensional arrays can be non-zero-based. We can either cut this suppo The following rules determine if a pattern is valid for a multi-dimensional array: -- For an array of rank N, only N level of nested list-patterns are accepted. +- For an array of rank N, only N-1 level of nested list-patterns are accepted. - Except for that last level, all subpatterns must be either a slice pattern without a subpattern (`..`) or a list-pattern. - For slice patterns, the usual rules apply - only permitted once and only directly inside the pattern. - All nested list-patterns must be of an exact or minimum size. Given X = the minimum or exact required length so far and Y = the new length from current nested list pattern, the expected size is calculated as follow: