你能在 F# 中定义一个运算符 (***) 吗?
我正在 F# 中处理箭头,我想创建一个 ***
运算符。但我注意到,(***)
(在函数定义中表达运算符的必要方式)与 F# 块注释语法重叠。那么你该如何表达这一点呢?
我想到了也许 .***.
但我认为这实际上会将点视为运算符的一部分,我宁愿避免这样做。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,但您需要在括号和星号之间添加空格:
Yes, but you need to add spaces between the parentheses and the asterisks: