Re: [Felix-language] Optimisation fun

2010-10-25 Thread john skaller
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

[Felix-language] Optimisation fun

2010-10-24 Thread john skaller
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