What are F# quotations?

只谈情不闲聊 提交于 2019-12-07 02:32:07

问题


What are "quotations" in F#, and what are they used for?


回答1:


In short, a quotation is metadata that represents the code of a particular function or code snippet.

http://fortysix-and-two.blogspot.com/2009/06/traversing-and-transforming-f.html




回答2:


See

http://msdn.microsoft.com/en-us/library/dd233212.aspx

and possibly

http://en.wikipedia.org/wiki/Homoiconicity

If you want scenarios, I bet you can find some by looking at

https://stackoverflow.com/questions/tagged/F%23+quotations




回答3:


They are equivalent to Expression<> objects in C#. They represent the expression tree of the code therein in a way that can be accessed by other code at runtime.



来源:https://stackoverflow.com/questions/3548395/what-are-f-quotations

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!