anchor.diff:              let objs, pms = csv.Environment.Values.ToArray(), csv.Environment.Keys
   
               let func = Expression.Lambda(expr', pms)
  -            Session.Compile(func), objs
  +            let source = func.ToString()
  +//            if CompiledThunks.cache.ContainsKey(source) then
  +//                Func<'T>(fun () -> CompiledThunks.cache.[source].Invoke() :?> 'T)
  +//            else
  +            let func = CoreHelpers.WrapInvocation(Session.Compile(func), objs)
  +                //let b = CompiledThunks.cache.TryAdd(source, func)
  +            Func<'T>(fun () -> func.Invoke() :?> 'T)
   
  -        static member private Compile(query : QueryExpr, compile : QueryExpr -> Expression) : Delegate =
  +        static member private Compile(query : QueryExpr, compile : QueryExpr -> Expression) : Func<'T> =
               let expr = compile query
  -            Expression.Lambda(expr).Compile()
  +            let source = expr.ToString()
  +//            if CompiledThunks.cache.ContainsKey(source) then
  +//                Func<'T>(fun () -> CompiledThunks.cache.[source].Invoke() :?> 'T)
  +//            else
  +            let func = Expression.Lambda<Func<obj>>(expr).Compile()
  +                //CompiledThunks.cache.TryAdd(source, func) |> ignore
  +            Func<'T>(fun () -> func.Invoke() :?> 'T)
   
  -        static member private WrapInvocation<'T>(mi : MethodInfo, args : obj []) =
  -            fun () -> 
  -                try mi.Invoke(null, args) :?> 'T
  -                with :? TargetInvocationException as ex -> 
  -                    if ex.InnerException :? MemberAccessException 
  -                    then raise <| Exception(
  -                                        "Attempting to access non public member or type from dynamic assembly. Consider making your type/member public or use the appropriate Run method.",
  -                                        ex.InnerException)
  -                    else raise ex.InnerException 
  -
  -
  -
  +        static member private WrapInvocation<'T>(mi : MethodInfo, args : obj []) : Func<obj> =
  +            Func<obj>(
  +                fun () -> 
  +                    try mi.Invoke(null, args) 
  +                    with :? TargetInvocationException as ex -> 
  +                        if ex.InnerException :? MemberAccessException 
  +                        then raise <| Exception(
  +                                            "Attempting to access non public member or type from dynamic assembly. Consider making your type/member public or use the appropriate Run method.",
  +                                            ex.InnerException)
  +                        else raise ex.InnerException )
   
           static member Compile<'T>(queryExpr : QueryExpr, optimize : Func<Expression,Expression>) : Func<'T> =
               CoreHelpers.Compile<'T>(queryExpr, optimize, false)
  
positive.code:     open System.Reflection
      open System.Reflection.Emit
  
  
      type CoreHelpers =
          static member AsQueryExpr(enumerable : IEnumerable, ty : Type) : QueryExpr = 
              // Hack to optimize Enumerable.Range and Enumerable.Repeat calls
              // TODO : check Mono generated types
  
negative.code:             | _ -> 
                  Source (constant enumerable, ty)
  
          static member private CompileToMethod(query : QueryExpr, compile : QueryExpr -> Expression) : Func<'T> =
              let expr = compile query
              
              let eraser = AnonymousTypeEraser()
  