Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Defining new keywords in F#'s computation expression

Tags:

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?

like image 947
forki23 Avatar asked Mar 05 '12 11:03

forki23


1 Answers

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.

like image 119
pad Avatar answered Sep 20 '22 12:09

pad