Defining new keywords in F#'s computation expression

前端 未结 1 577
执笔经年
执笔经年 2021-02-07 03:20

The F# 3.0 beta contains a query {} computation expression with tons of new keywords.

How can I define my own keywords in a computation builder?

1条回答
  •  無奈伤痛
    2021-02-07 04:05

    In F# 3.0, you can use CustomOperationAttribute for this purpose.

    The new attribute is not very well-documented, the only examples I find are this great answer by @Tomas and this interesting blog post.

    0 讨论(0)
提交回复
热议问题