Created
July 20, 2015 17:25
-
-
Save richlander/be1fe5180631fb298460 to your computer and use it in GitHub Desktop.
Implicit quotation of method arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Test = | |
static member EchoExpression([<ReflectedDefinition(true)>] x : Expr<_>) = | |
let expression, value = (* decompose AST of x *) | |
printfn "%s evaluates to %O" expression value | |
let x, y, z = 42, 89.0, 92.5 | |
Test.EchoExpression(x) // "x evaluates to 42" | |
Test.EchExpression(Math.Max(y, z)) // "Math.Max(y, z) evaluates to 92.5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment