Skip to content

Commit

Permalink
Fix typo in 4ad_01_operators.md (#2219)
Browse files Browse the repository at this point in the history
* @vog Fix typo in 4ad_01_operators.md

* Apply suggestions from code review

* Apply suggestions from code review

* Update data/tutorials/language/4ad_01_operators.md

---------

Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com>
  • Loading branch information
vog and cuihtlauac committed Mar 25, 2024
1 parent 45b7c51 commit d89e804
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions data/tutorials/language/4ad_01_operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,23 @@ OCaml has a subtle syntax; not everything is allowed as an operator symbol. An o

**Prefix Operator**

1. First character
* `?` `~` or
* `!`
1. Following characters, at least one if the first character is `!`, optional otherwise
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|` or
* `%` `<`
1. First character, either:
* `?` `~`
* `!`
1. Following characters, at least one if the first character is `?` or `~`, optional otherwise:
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|`
* `%` `<`

**Binary Operator**
1. First character
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|` or
* `%` `<` or
* `#`
2. Following characters, at least one if the first character is `#`, optional otherwise
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|` or
* `%` `<` or
* `!` `.` `:` `?` `~`

1. First character, either:
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|`
* `%` `<`
* `#`
1. Following characters, at least one if the first character is `#`, optional otherwise:
* `$` `&` `*` `+` `-` `/` `=` `>` `@` `^` `|`
* `%` `<`
* `!` `.` `:` `?` `~`

This is defined in the [Prefix and Infix symbols](/manual/lex.html#sss:lex-ops-symbols) section of The OCaml Manual.

Expand Down

0 comments on commit d89e804

Please sign in to comment.