Skip to content

Commit

Permalink
Tour of OCaml - Pattern typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sc4ramouche authored Dec 3, 2023
1 parent 4f32d84 commit ca55ab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/tutorials/getting-started/1_01_a_tour_of_ocaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ val map : ('a -> 'b) -> 'a list -> 'b list = <fun>

### Pattern Matching, Cont'd

Patten matching isn't limited to lists. Any kind of data can be inspected using it, except functions. Patterns are expressions that are compared to an inspected value. It could be performed using `if … then … else …`, but pattern matching is more convenient. Here is an example using the `option` data type that will be detailed in the [Modules and the Standard Library](#modules-and-the-standard-library) section.
Pattern matching isn't limited to lists. Any kind of data can be inspected using it, except functions. Patterns are expressions that are compared to an inspected value. It could be performed using `if … then … else …`, but pattern matching is more convenient. Here is an example using the `option` data type that will be detailed in the [Modules and the Standard Library](#modules-and-the-standard-library) section.
```ocaml
# #show option;;
type 'a option = None | Some of 'a
Expand Down

0 comments on commit ca55ab4

Please sign in to comment.