Why does direct code quotation of System.Func yield a delegate and spliced quotation yields a lambda?

Viewed 74

I was surprised that the direct code quotation

<@ System.Func<int,int>( fun x -> x+1 ) @>

produces an Expr.NewDelegate and the spliced code quotation

<@ fun x -> x+1 @> |> fun e -> <@ System.Func<int,int>( %e ) @>

produces an Expr.Lambda, I had assumed these expressions were equivalent.

Is that expected? Is there an explanation why?

0 Answers
Related