On 25/10/2010, at 2:57 PM, john skaller wrote:
>
>
> val h = f . g;
> println$ h 1;
>
> Here the composition isn't in an application, so the reduction,
> which is run *before* inlining, isn't applied. After inlining,
> there is new code in "mkcls.ml" to make a closure:
>
> fun h(x:int)=> f(g(x
Well, in getting function composition to work, I have run into
a typical and interesting problem.
Basically, the expression "reduce" function does:
apply(compose(f,g),a) --> apply(g,apply(f,a))
eliminating the composition if it occurs in an application.
But now consider this:
val h = f . g;
pr