On 12/23/2011 01:04 PM, rixed@happyleptic.org wrote: >> This will compile if you ??-expand the partial application of >> some_operation into ???(fun t1 -> some_operation t_priv t1)???. >> >> But perhaps your example is over simplified and hide the real >> difficulty. > > No you are right, once eta-epxanded the compiler accepted the code. > I wonder what difference it makes in the generated code, if any. > Thank you very much for the tip! The difference is that the function is evaluated everytime you want to access the value. If the function is cheap and has no side-effect, it is perfectly fine, but if it is not the case, the cost will be much higher. --Fabrice