Skip to content

Commit

Permalink
Fix 1774 (#1775)
Browse files Browse the repository at this point in the history
Co-authored-by: Cuihtlauac ALVARADO <[email protected]>
  • Loading branch information
cuihtlauac and Cuihtlauac ALVARADO authored Nov 16, 2023
1 parent 813ae6e commit e503cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/tutorials/getting-started/1_01_a_tour_of_ocaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ val f : 'a option option-> 'a option = <fun>

The inspected value is `opt` of type `option`. It is compared against the patterns from top to bottom. If `opt` is the `None` option, it is a match with the first pattern. If `opt` is the `Some None` option, it's a match with the second pattern. If `opt` is a double-wrapped option with a value, it's a match with the third pattern. Patterns can introduce names, just as `let` does. In the third pattern, `x` designates the data inside the double-wrapped option.

Pattern matching is detailed in the [Basic Datatypes](/docs/basic-datatypes) tutorial as well as in per data type tutorials.
Pattern matching is detailed in the [Basic Datatypes](/docs/basic-data-types) tutorial as well as in per data type tutorials.

In this other example, the same comparison is made, using `if … then … else …` and pattern matching.
```ocaml
Expand Down Expand Up @@ -544,7 +544,7 @@ type person = { first_name : string; surname : string; age : int; }
# let gerard = {
first_name = "Gérard";
surname = "Huet";
age = 40
age = 76
};;
val gerard : person = {first_name = "Gérard"; surname = "Huet"; age = 76}
```
Expand Down

0 comments on commit e503cc1

Please sign in to comment.