anchor.diff:                      | _ -> failwith "Not currently supported"
   
                   let stateParameter =
  -                    Expression.Parameter (stateType, "state")
  +                    Expression.Parameter (stateType, "capturedState")
   
                   let stateEnvironment =
                       match capturedVars with
  
positive.code:                   
                  let ``type`` = funcFSharp.MakeGenericType parameterTypes
  
                  let ``constructor`` = ``type``.GetConstructor [| ``function``.GetType (); stateType |]
  
                  match capturedVars with
                  | [] ->
                      let obj = ``constructor``.Invoke [| ``function``; null |]
                      Expression.Constant (obj) |> asExpr
                  | v1 :: [] ->
                      let state = Map.find v1 env.varEnv
                      Expression.New (``constructor``, [Expression.Constant(``function``) |> asExpr; state]) |> asExpr
                  | _ ->
                      let state =
                          capturedVars
                          |> List.map (fun var -> Map.find var env.varEnv)
  
                      let stateConstructor =
                          let types = 
                              capturedVars
                              |> List.map (fun var -> var.Type)
                              |> List.toArray
  
                          stateType.GetConstructor types
  
                      Expression.New (``constructor``, [Expression.Constant(``function``) |> asExpr; Expression.New(stateConstructor, state) |> asExpr]) |> asExpr
              else
                  let v, body = firstVar, firstBody
  
  
negative.code:     let genericLessOrEqualIntrinsic = "GenericLessOrEqualIntrinsic" |> hashCompareType.GetMethod
  
  
      type ConvEnv = {
          eraseEquality : bool
          varEnv        : Map<Var,Expression>
          letrec        : option<Var>
      }
      let asExpr x = (x :> Expression)
  
      let bindingFlags = BindingFlags.Public ||| BindingFlags.NonPublic
  