8

I'm working on Arrows in F# and I wanted to create a *** operator. I note, however, that (***), the necessary way to express an operator in a function definition, overlaps with the F# block comment syntax. So how could you actually express this?

I thought of maybe .***. but I think that will actually treat the dots as part of the operator, which I'd rather avoid.

CodexArcanum
  • 3,944
  • 3
  • 35
  • 40

1 Answers1

16

Yes, but you need to add spaces between the parentheses and the asterisks:

let ( *** ) x y = x * y

let z = 4 *** 5
kvb
  • 54,864
  • 2
  • 91
  • 133