$ allowed in the user statement, but if you try to use $$ , <$> or, for example, ~$% as the name of the operator, you will get the following error:
error FS0035: this construct is deprecated: "$" is not allowed as a character in operator names and is reserved for future use
$ clearly also has a $ in the name , but it works, why? I.e:.
let inline ( $ ) fy = fy // using it works just fine: let test = let add x = x + 1 add $ 12
I see $ lot in online examples and, apparently, as a specific operator. What is this relation or role for $ (i.e. In Haskell or OCaml) and what to do <$> if it is allowed (to edit)?
An attempt to fool the system by creating a function such as op_DollarDollar does not fly, syntax checking is also performed on the call site. Although, for example, this trick works with other (legal) operators:
// works let inline op_BarQmark fy = fy let test = let add x = x + 1 add |? 12 // also works: let inline op_Dollar fy = fy let test = let add x = seq { yield x + 1 } add $ 12
source share