Skip to content

Commit 751e2a6

Browse files
authored
Note precedence of infix operators created with backticks (#393)
* Note precedence of infix operators created with backticks * Review Feedback - Remove "by default"
1 parent 51d389e commit 751e2a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

language/Syntax.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,12 @@ Operator sections also work for functions used this way:
451451
fooBy2 = (_ `foo` 2)
452452
```
453453

454+
Infix operators created using backticks are left associative with the highest precedence.
455+
456+
``` purescript
457+
result = 1 `add` 2 * 3 -- == 9
458+
```
459+
454460
## Case expressions
455461

456462
The `case` and `of` keywords are used to deconstruct values to create logic based on the value's constructors. You can match on multiple values by delimiting them with `,` in the head and cases.

0 commit comments

Comments
 (0)