FSharp Quotations
FSharp Quotations

Reputation: 63

What are F# quotations?

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

Upvotes: 6

Views: 558

Answers (3)

AHungerArtist
AHungerArtist

Reputation: 9579

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

Upvotes: 3

Marcelo Cantos
Marcelo Cantos

Reputation: 185862

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.

Upvotes: 4

Brian
Brian

Reputation: 118865

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

Upvotes: 7

Related Questions