Is there a way I can explicitly the elements of a new operator I define?
I've checked the doc but couldn't find it: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/operator-overloading#creating-new-operators
Let's say I have defined the following xor
operator:
let (^@) a b =
a <> b
let result = true ^@ false
It works correctly, but the following definition no...
let (@^) (a: bool, b:bool) : bool =
a <> b
In @^
the parameters are tupled. Your operator needs two parameters. If you specify
let (@^) (a: bool) (b: bool) : bool =
a <> b
then
true @^ false // true