Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

F# Custom Operators Precedence

Tags:

operators

f#

In F#, you can define custom operators like

let (=~) input pattern = Regex.IsMatch(input, pattern)

Unlike Haskell, custom operators are defined without precedences. What are the operator precedences of the custom operators in F#?

like image 668
Ming-Tang Avatar asked Jul 27 '10 21:07

Ming-Tang


1 Answers

Operator precedence is determined by the first character(s), according to a predefined table.

like image 69
Gilles 'SO- stop being evil' Avatar answered Nov 03 '22 04:11

Gilles 'SO- stop being evil'