title: Evaluate function inside quotation
body: <p>I'm at the moment doing some very basic pattern matching with quotations.</p>
  
  <p>My code:</p>
  
  <pre><code>let rec test e =
      match e with
      | Patterns.Lambda(v,e) -&gt; test e
      | Patterns.Call(_, mi, [P.Value(value, _); P.Value(value2, _)]) -&gt; 
          printfn "Value1: %A | Value2 : %A" value value2
      | Patterns.Call(_, mi, [P.Value(value, _); P.PropertyGet(_, pi, exprs)]) -&gt;
          printfn "Value1: %A | Value2 : %A" value (pi.GetValue(pi, null))
      | _ -&gt; failwith "Expression not supported"
  
  
  let quot1 = &lt;@ "Name" = "MyName" @&gt;
  (* Call (None, Boolean op_Equality[String](System.String, System.String),
        [Value ("Name"), Value ("lol")]) *)
  
  let quot2 = &lt;@ "Name" = getNameById 5 @&gt;
  (* Call (None, Boolean op_Equality[String](System.String, System.String),
        [Value ("Name"),
         Call (None, System.String getNameById[Int32](Int32), [Value (5)])]) *)
  
  test quot1 // Works!
  test quot2 // Fails.. Dosent match any of the patterns.
  </code></pre>
  
  <p>Is it possible to somehow evaluate the result of the <code>getNameById</code> function first, so that it will match one of the patterns, or am I doomed to assign a let binding with the result of the function outside the quotation?</p>
  
  <p>I've tried playing with the <code>ExprShape</code> patterns, but without luck..</p>