Skip to content

Commit f0837e6

Browse files
committed
Fixes #203
1 parent a507ece commit f0837e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pages/docs/manual/latest/pattern-matching-destructuring.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let Success(message) = myResult // "You did it!" assigned to `message`
5151
5252
// Array
5353
let myArray = [1, 2, 3]
54-
let [item1, item2] = myArray // 1 assigned to `item1`, 2 assigned to `item2`
54+
let [item1, item2, _] = myArray // 1 assigned to `item1`, 2 assigned to `item2`, 3rd item ignored
5555
5656
// List
5757
let myList = list{1, 2, 3}

pages/docs/manual/v8.0.0/pattern-matching-destructuring.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ let Success(message) = myResult; // "You did it!" assigned to `message`
5656

5757
// Array
5858
let myArray = [|1, 2, 3|];
59-
let [|item1, item2|] = myArray; // 1 assigned to `item1`, 2 assigned to `item2`
59+
let [|item1, item2, _|] = myArray; // 1 assigned to `item1`, 2 assigned to `item2`, 3rd item ignored
6060

6161
// List
6262
let myList = [1, 2, 3];
@@ -76,7 +76,7 @@ let Success message = myResult (* "You did it!" assigned to `message` *)
7676
7777
(* Array *)
7878
let myArray = [|1; 2; 3|]
79-
let [|item1; item2|] = myArray (* 1 assigned to `item1`, 2 assigned to `item2` *)
79+
let [|item1; item2; _|] = myArray (* 1 assigned to `item1`, 2 assigned to `item2`, 3rd item ignored *)
8080
8181
(* List *)
8282
let myList = [1; 2; 3]

0 commit comments

Comments
 (0)