Quoted expressions annotated with System.Type values.
Instance member | Description |
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the custom attributes of an expression. For quotations deriving from quotation literals this may include the source location of the literal. Example
open FSharp.Quotations open FSharp.Quotations.Patterns let sampleQuotation = <@ 1 + 1 @> sampleQuotation.CustomAttributesEvaluates to a list of expressions containing one custom attribute for the source location of the quotation literal. |
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let sampleQuotation = <@ fun v -> v * v @> let v, body = match sampleQuotation with | Lambda(v, body) -> (v, body) | _ -> failwith "unreachable" body.GetFreeVars()Evaluates to a set containing the single variable for v
|
|
![]() ![]() ![]() ![]() ![]() ![]() Substitutes through the given expression using the given functions to map variables to new values. The functions must give consistent results at each application. Variable renaming may occur on the target expression if variable capture occurs.
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let sampleQuotation = <@ fun v -> v * v @> let v, body = match sampleQuotation with | Lambda(v, body) -> (v, body) | _ -> failwith "unreachable" body.Substitute(function v2 when v = v2 -> Some <@ 1 + 1 @> | _ -> None)Evaluates to <@ (1 + 1) * (1 + 1)> .
|
|
Example
open FSharp.Quotations let expr1 = <@ 1 + 1 @> expr1.ToString(true)Evaluates "Call (None, Int32 op_Addition[Int32,Int32,Int32](Int32, Int32),[Value (1), Value (1)])" .
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let sampleQuotation = <@ 1 + 1 @> sampleQuotation.TypeEvaluates to typeof<int> .
|
Static member | Description |
|
Example
open FSharp.Quotations let array = [| 1; 2; 3 |] Expr.AddressOf(<@ array.[1] @>)Evaluates to AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])) .
|
|
Example
open FSharp.Quotations let array = [| 1; 2; 3 |] let addrExpr = Expr.AddressOf(<@ array.[1] @>) Expr.AddressSet(addrExpr, <@ 4 @>)Evaluates to AddressSet (AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])), Value (4)) .
|
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents the application of a first class function value to a single argument.
Example
open FSharp.Quotations let funcExpr = <@ (fun x -> x + 1) @> let argExpr = <@ 3 @> Expr.Application(funcExpr, argExpr)Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @> .
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents the application of a first class function value to multiple arguments
Example
open FSharp.Quotations let funcExpr = <@ (fun (x, y) z -> x + y + z) @> let curriedArgExprs = [[ <@ 1 @>; <@ 2 @> ]; [ <@ 3 @> ]] Expr.Applications(funcExpr, curriedArgExprs)Evaluates to a quotation with the same structure as <@ (fun (x, y) z -> x + y + z) (1,2) 3 @> .
|
|
Full Usage:
Expr.Call(obj, methodInfo, arguments)
Parameters:
Expr
-
The input object.
methodInfo : MethodInfo
-
The description of the method to call.
arguments : Expr list
-
The list of arguments to the method.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Quotations.Patterns let objExpr, methInfo = match <@ Console.Out.WriteLine("1") @> with | Call(Some obj, mi, _) -> obj, mi | _ -> failwith "call expected" let argExpr = <@ "Hello World" @> Expr.Call(objExpr, methInfo, [argExpr])Evaluates to a quotation with the same structure as <@ Console.Out.WriteLine("Hello World") @> .
|
Full Usage:
Expr.Call(methodInfo, arguments)
Parameters:
MethodInfo
-
The MethodInfo describing the method to call.
arguments : Expr list
-
The list of arguments to the method.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Quotations.Patterns let methInfo = match <@ Console.WriteLine("1") @> with | Call(_, mi, _) -> mi | _ -> failwith "call expected" let argExpr = <@ "Hello World" @> Expr.Call(methInfo, [argExpr])Evaluates to a quotation with the same structure as <@ Console.WriteLine("Hello World") @> .
|
Full Usage:
Expr.CallWithWitnesses(obj, methodInfo, methodInfoWithWitnesses, witnesses, arguments)
Parameters:
Expr
-
The input object.
methodInfo : MethodInfo
-
The description of the method to call.
methodInfoWithWitnesses : MethodInfo
-
The additional MethodInfo describing the method to call, accepting witnesses.
witnesses : Expr list
-
The list of witnesses to the method.
arguments : Expr list
-
The list of arguments to the method.
Returns: Expr
The resulting expression.
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents a call to an instance method associated with an object, potentially passing additional witness arguments
ExampleSee examples for Call and CallWithWitnesses |
Full Usage:
Expr.CallWithWitnesses(methodInfo, methodInfoWithWitnesses, witnesses, arguments)
Parameters:
MethodInfo
-
The MethodInfo describing the method to call.
methodInfoWithWitnesses : MethodInfo
-
The additional MethodInfo describing the method to call, accepting witnesses.
witnesses : Expr list
-
The list of witnesses to the method.
arguments : Expr list
-
The list of arguments to the method.
Returns: Expr
The resulting expression.
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents a call to an static method or module-bound function, potentially passing additional witness arguments
ExampleIn this example, we show how to use a witness to cosntruct an `op_Addition` call for a type that doesn't support addition directly: open FSharp.Quotations open FSharp.Quotations.Patterns // Get the entrypoint for inline addition that takes an explicit witness let addMethInfoG, addMethInfoGW = match <@ 1+1 @> with | CallWithWitnesses(None, mi, miW, _, _) -> mi.GetGenericMethodDefinition(), miW.GetGenericMethodDefinition() | _ -> failwith "call expected" // Make a non-standard witness for addition for a type C type C(value: int) = member x.Value = value let witnessExpr = <@ (fun (x: C) (y: C) -> C(x.Value + y.Value)) @> let argExpr1 = <@ C(4) @> let argExpr2 = <@ C(5) @> // Instantiate the generic method at the right type let addMethInfo = addMethInfoG.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) let addMethInfoW = addMethInfoGW.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) Expr.CallWithWitnesses(addMethInfo, addMethInfoW, [witnessExpr], [argExpr1; argExpr2])Evaluates to a quotation with the same structure as <@ Call (None, op_Addition, [NewObject (C, Value (4)), NewObject (C, Value (5))]) @> .
|
|
![]() ![]() ![]() ![]() ![]() ![]() Returns a new typed expression given an underlying runtime-typed expression. A type annotation is usually required to use this function, and using an incorrect type annotation may result in a later runtime exception.
Example
open FSharp.Quotations let rawExpr = <@ 1 @> Expr.Cast<int>(rawExpr)Evaluates with type Expr<int> .
|
|
Example
open FSharp.Quotations let expr = <@ box "3" @> Expr.Coerce(expr, typeof<string>)Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @> .
|
|
Example
open FSharp.Quotations Expr.DefaultValue(typeof<int>)Evaluates to the quotation DefaultValue (Int32) .
|
Full Usage:
Expr.Deserialize(qualifyingType, spliceTypes, spliceExprs, bytes)
Parameters:
Type
-
A type in the assembly where the quotation occurs.
spliceTypes : Type list
-
The spliced types, to replace references to type variables.
spliceExprs : Expr list
-
The spliced expressions to replace references to spliced expressions.
bytes : byte[]
-
The serialized form of the quoted expression.
Returns: Expr
The resulting expression.
|
![]() ![]() ![]() ![]() ![]() ![]() This function is called automatically when quotation syntax (<@ @>) and other sources of quotations are used.
|
Full Usage:
Expr.Deserialize40(qualifyingType, referencedTypes, spliceTypes, spliceExprs, bytes)
Parameters:
Type
-
A type in the assembly where the quotation occurs.
referencedTypes : Type[]
-
The type definitions referenced.
spliceTypes : Type[]
-
The spliced types, to replace references to type variables.
spliceExprs : Expr[]
-
The spliced expressions to replace references to spliced expressions.
bytes : byte[]
-
The serialized form of the quoted expression.
Returns: Expr
The resulting expression.
|
![]() ![]() ![]() ![]() ![]() ![]() This function is called automatically when quotation syntax (<@ @>) and other sources of quotations are used.
|
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let fieldInfo = typeof<int ref>.GetField("contents@") let refValue = ref 3 let refExpr = <@ refValue @> Expr.FieldGet(refExpr, fieldInfo)Evaluates to FieldGet (Some (PropertyGet (None, refValue, [])), contents@) .
Note that for technical reasons the quotation <@ refValue.contents @> evaluates to a different quotation
accessing the contents field via a property.
|
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let fieldInfo = typeof<System.DayOfWeek>.GetField("Monday") Expr.FieldGet(fieldInfo)Evaluates to FieldGet (None, Monday) . Note that for technical reasons the quotation <@ System.DayOfWeek.Monday @> evaluates to a different quotation containing a constant enum value Value (Monday) .
|
|
ExampleCreate an expression setting a reference cell via the public backing field: open FSharp.Quotations open FSharp.Quotations.Patterns let fieldInfo = typeof<int ref>.GetField("contents@") let refValue = ref 3 let refExpr = <@ refValue @> let valueExpr = <@ 6 @> Expr.FieldSet(refExpr, fieldInfo, valueExpr)Evaluates to FieldSet (Some (PropertyGet (None, refValue, [])), contents@, Value (6)) .
Note that for technical reasons the quotation <@ refValue.contents <- 6 @> evaluates to a slightly different quotation
accessing the contents field via a property.
|
|
Settable public static fields are rare in F# and .NET libraries, so examples of using this method are uncommon.
|
Full Usage:
Expr.ForIntegerRangeLoop(loopVariable, start, endExpr, body)
Parameters:
Var
-
The sub-expression declaring the loop variable.
start : Expr
-
The sub-expression setting the initial value of the loop variable.
endExpr : Expr
-
The sub-expression declaring the final value of the loop variable.
body : Expr
-
The sub-expression representing the body of the loop.
Returns: Expr
The resulting expression.
|
Example
open FSharp.Quotations let loopVariable = Var("x", typeof<int>) let startExpr = <@ 6 @> let endExpr = <@ 7 @> let body = <@ System.Console.WriteLine("hello") @> Expr.ForIntegerRangeLoop(loopVariable, startExpr, endExpr, body)Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @> .
|
|
![]() ![]() ![]() ![]() ![]() ![]() Fetches or creates a new variable with the given name and type from a global pool of shared variables indexed by name and type. The type is given by the explicit or inferred type parameter
Example
open FSharp.Quotations let expr1 = Expr.GlobalVar<int>("x") let expr2 = Expr.GlobalVar<int>("x")Evaluates expr1 and expr2 to identical quotations.
|
|
Example
open FSharp.Quotations let guardExpr = <@ 1 > 3 @> let thenExpr = <@ 6 @> let elseExpr = <@ 7 @> Expr.IfThenElse(guardExpr, thenExpr, elseExpr)Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @> .
|
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let vVar = Var("v", typeof<int>) let vExpr = Expr.Var(vVar) Expr.Lambda(vVar, vExpr)Evaluates to Lambda (v, v) .
|
|
Example
open FSharp.Quotations let vVar = Var("v", typeof<int>) let rhsExpr = <@ 6 @> let vExpr = Expr.Var(vVar) Expr.Let(vVar, rhsExpr, vExpr)Evaluates to a quotation with the same structure as <@ let v = 6 in v @> .
|
Example
open FSharp.Quotations open FSharp.Quotations.Patterns let fVar = Var("f", typeof<int -> int>) let gVar = Var("v", typeof<int -> int>) let fExpr = Expr.Var(fVar) let gExpr = Expr.Var(gVar) let fImplExpr = <@ fun x -> (%%gExpr : int -> int) (x - 1) + 1 @> let gImplExpr = <@ fun x -> if x > 0 then (%%fExpr : int -> int) (x - 1) else 0 @> let bodyExpr = <@ (%%gExpr : int -> int) 10 @> Expr.LetRecursive([(fVar, fImplExpr); (gVar, gImplExpr)], bodyExpr)Evaluates to a quotation with the same structure as <@ let rec f x = g (x-1) + 1 and g x = if x > 0 then f (x - 1) else 0 in g 10 @> .
|
|
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents the creation of an array value initialized with the given elements
Example
open FSharp.Quotations Expr.NewArray(typeof<int>, [ <@ 1 @>; <@ 2 @> ])Evaluates to a quotation with the same structure as <@ [| 1; 2 |] @> .
|
|
Example
open System open FSharp.Quotations let vVar = Var("v", typeof<int>) let vExpr = Expr.Var(vVar) Expr.NewDelegate(typeof<Func<int,int>>, [vVar], vExpr)Evaluates to a quotation with the same structure as <@ new System.Func<int, int>(fun v -> v) @> .
|
Full Usage:
Expr.NewObject(constructorInfo, arguments)
Parameters:
ConstructorInfo
-
The description of the constructor.
arguments : Expr list
-
The list of arguments to the constructor.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Quotations.Patterns let ctorInfo = match <@ new System.DateTime(100L) @> with | NewObject(ci, _) -> ci | _ -> failwith "call expected" let argExpr = <@ 100000L @> Expr.NewObject(ctorInfo, [argExpr])Evaluates to a quotation with the same structure as <@ NewObject (DateTime, Value (100000L)) @> .
|
|
Example
open FSharp.Quotations type R = { Y: int; X: string } Expr.NewRecord(typeof<R>, [ <@ 1 @>; <@ "a" @> ])Evaluates to a quotation with the same structure as <@ { Y = 1; X = "a" } @> .
|
|
Example
open FSharp.Quotations Expr.NewStructTuple(typeof<struct (int * int)>.Assembly, [ <@ 1 @>; <@ "a" @> ])Evaluates to a quotation with the same structure as <@ struct (1, "a") @> .
|
|
Example
open FSharp.Quotations Expr.NewTuple([ <@ 1 @>; <@ "a" @> ])Evaluates to a quotation with the same structure as <@ (1, "a") @> .
|
Full Usage:
Expr.NewUnionCase(unionCase, arguments)
Parameters:
UnionCaseInfo
-
The description of the union case.
arguments : Expr list
-
The list of arguments for the case.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Reflection let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] Expr.NewUnionCase(ucCons, [ <@ 10 @>; <@ [11] @> ])Evaluates to a quotation with the same structure as <@ 10 :: [11] @> .
|
Full Usage:
Expr.PropertyGet(property, ?indexerArgs)
Parameters:
PropertyInfo
-
The description of the property.
?indexerArgs : Expr list
-
List of indices for the property if it is an indexed property.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Quotations.Patterns let propInfo = match <@ Console.Out @> with | PropertyGet(None, pi, _) -> pi | _ -> failwith "property get expected" Expr.PropertyGet(propInfo)Evaluates to a quotation with the same structure as <@ Console.Out @> .
|
Full Usage:
Expr.PropertyGet(obj, property, ?indexerArgs)
Parameters:
Expr
-
The input object.
property : PropertyInfo
-
The description of the property.
?indexerArgs : Expr list
-
List of indices for the property if it is an indexed property.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Quotations.Patterns let propInfo = match <@ "a".Length @> with | PropertyGet(Some _, pi, _) -> pi | _ -> failwith "property get expected" let objExpr = <@ "bb" @> Expr.PropertyGet(objExpr, propInfo)Evaluates to a quotation with the same structure as <@ "bb".Length @> .
|
Full Usage:
Expr.PropertySet(property, value, ?indexerArgs)
Parameters:
PropertyInfo
-
The description of the property.
value : Expr
-
The value to set.
?indexerArgs : Expr list
-
List of indices for the property if it is an indexed property.
Returns: Expr
The resulting expression.
|
Example
open System open System.Collections.Generic open FSharp.Quotations open FSharp.Quotations.Patterns let propInfo = match <@ Console.BackgroundColor <- ConsoleColor.Red @> with | PropertySet(None, pi, _, _) -> pi | _ -> failwith "property get expected" Expr.PropertySet(propInfo, <@ ConsoleColor.Blue @>)Evaluates to a quotation with the same structure as <@ Console.BackgroundColor <- ConsoleColor.Blue @> .
|
Full Usage:
Expr.PropertySet(obj, property, value, ?indexerArgs)
Parameters:
Expr
-
The input object.
property : PropertyInfo
-
The description of the property.
value : Expr
-
The value to set.
?indexerArgs : Expr list
-
List of indices for the property if it is an indexed property.
Returns: Expr
The resulting expression.
|
Example
open System open System.Collections.Generic open FSharp.Quotations open FSharp.Quotations.Patterns let propInfo = match <@ (new List<int>()).Capacity @> with | PropertyGet(Some _, pi, _) -> pi | _ -> failwith "property get expected" let objExpr = <@ (new List<int>()) @> Expr.PropertySet(objExpr, propInfo, <@ 6 @>)Evaluates to a quotation with the same structure as <@ (new List<int>()).Capacity <- 6 @> .
|
|
Example
open FSharp.Quotations Expr.QuoteRaw(<@ 1 @>)Evaluates to a quotation with the same structure as <@ <@ 1 @> @> .
|
|
Example
open FSharp.Quotations Expr.QuoteTyped(<@ 1 @>)Evaluates to a quotation with the same structure as <@ <@ 1 @> @> .
|
Full Usage:
Expr.RegisterReflectedDefinitions(assembly, resource, serializedValue, referencedTypes)
Parameters:
Assembly
-
The assembly associated with the resource.
resource : string
-
The unique name for the resources being added.
serializedValue : byte[]
-
The serialized resource to register with the environment.
referencedTypes : Type[]
-
The type definitions referenced.
|
|
Full Usage:
Expr.RegisterReflectedDefinitions(assembly, resource, serializedValue)
Parameters:
Assembly
-
The assembly associated with the resource.
resource : string
-
The unique name for the resources being added.
serializedValue : byte[]
-
The serialized resource to register with the environment.
|
|
|
Example
open System open FSharp.Quotations Expr.Sequential(<@ Console.WriteLine("a") @>, <@ Console.WriteLine("b") @>)Evaluates to a quotation with the same structure as <@ Console.WriteLine("a"); Console.WriteLine("b") @> .
|
|
Example
open System open FSharp.Quotations Expr.TryFinally(<@ 1+1 @>, <@ Console.WriteLine("finally") @>)Evaluates to a quotation with the same structure as <@ try 1+1 finally Console.WriteLine("finally") @> .
|
Full Usage:
Expr.TryGetReflectedDefinition(methodBase)
Parameters:
MethodBase
-
The description of the method to find.
Returns: Expr option
The reflection definition or None if a match could not be found.
|
![]() ![]() ![]() ![]() ![]() ![]()
Try and find a stored reflection definition for the given method. Stored reflection
definitions are added to an F# assembly through the use of the [
Example
open FSharp.Quotations open FSharp.Quotations.Patterns [<ReflectedDefinition>] let f x = x + 1 let methInfo = match <@ f 1 @> with | Call(_, mi, _) -> mi | _ -> failwith "call expected" Expr.TryGetReflectedDefinition(methInfo)Evaluates to a quotation with the same structure as <@ fun x -> x + 1 @> , which is the implementation of the
method f .
Example
open FSharp.Quotations open FSharp.Quotations.Patterns [<ReflectedDefinition>] module Methods = let f x = (x, x) let methInfoGeneric = match <@ Methods.f (1, 2) @> with | Call(_, mi, _) -> mi.GetGenericMethodDefinition() | _ -> failwith "call expected" let methInfoAtString = methInfoGeneric.MakeGenericMethod(typeof<string>) Expr.TryGetReflectedDefinition(methInfoAtString)Evaluates to a quotation with the same structure as <@ fun (x: string) -> (x, x) @> , which is the implementation of the
generic method f instanatiated at type string .
|
Full Usage:
Expr.TryWith(body, filterVar, filterBody, catchVar, catchBody)
Parameters:
Expr
-
The body of the try expression.
filterVar : Var
-
filterBody : Expr
-
catchVar : Var
-
The variable to bind to a caught exception.
catchBody : Expr
-
The expression evaluated when an exception is caught.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations let exnVar = Var("exn", typeof<exn>) Expr.TryWith(<@ 1+1 @>, exnVar, <@ 1 @>, exnVar, <@ 2+2 @>)Evaluates to a quotation with the same structure as <@ try 1+1 with exn -> 2+2 @> .
|
|
Example
open FSharp.Quotations let tupExpr = <@ (1, 2, 3) @> Expr.TupleGet(tupExpr, 1)Evaluates to quotation that displays as TupleGet (NewTuple (Value (1), Value (2), Value (3)), 1) .
|
|
Example
open FSharp.Quotations let obj = box 1 Expr.TypeTest( <@ obj @>, typeof<int>)Evaluates to quotation that displays as TypeTest (Int32, PropertyGet (None, obj, [])) .
|
Full Usage:
Expr.UnionCaseTest(source, unionCase)
Parameters:
Expr
-
The expression to test.
unionCase : UnionCaseInfo
-
The description of the union case.
Returns: Expr
The resulting expression.
|
Example
open System open FSharp.Quotations open FSharp.Reflection let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] Expr.UnionCaseTest(<@ [11] @>, ucCons)Evaluates to a quotation that displays as UnionCaseTest (NewUnionCase (Cons, Value (11), NewUnionCase (Empty)), Cons) .
|
|
Example
open FSharp.Quotations Expr.Value(1)Evaluates to a quotation with the same structure as <@ 1 @> .
|
|
Example
open FSharp.Quotations Expr.Value(box 1, typeof<int>)Evaluates to a quotation with the same structure as <@ 1 @> .
|
|
![]() ![]() ![]() ![]() ![]() ![]() Builds an expression that represents a constant value of a particular type, arising from a variable of the given name
Example
open FSharp.Quotations Expr.ValueWithName(box 1, typeof<int>, "name")Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name" .
|
|
Example
open FSharp.Quotations Expr.ValueWithName(1, "name")Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name" .
|
|
Example
open FSharp.Quotations let vVar = Var("v", typeof<int>) Expr.Var(vVar)Evaluates to a quotation displayed as v .
|
|
Example
open FSharp.Quotations let vVar = Var("v", typeof<int>, isMutable=true) Expr.VarSet(vVar, <@ 5 @>)Evaluates to a quotation displayed as VarSet (v, Value (5)) .
|
|
Example
open FSharp.Quotations let guardExpr = <@ true @> let bodyExpr = <@ () @> Expr.WhileLoop(guardExpr, bodyExpr)Evaluates to a quotation with the same structure as <@ while true do () @> .
|
|
Example
open FSharp.Quotations Expr.WithValue(box 1, typeof<int>, <@ 2 - 1 @>)Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])) .
|
|
Example
open FSharp.Quotations Expr.WithValue(1, <@ 2 - 1 @>)Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])) .
|