green's functions, passing functions to a routine



On Sun, Sep 7, 2008 at 11:34 PM, John Lapeyre <pdl at johnlapeyre.com> wrote:

> Am I incorrect in thinking that using 'apply' instead of a function
> call is also a reasonable solution to the problem ?


It just seems a bit heavy to write apply(f,[a,b,c]) where (+f)(a,b,c) would
do.

But if performance matters, and you compile your code +f() -- alas! -- takes
about 2.5 times as long as a static function call or an apply because the
compiler doesn't know about (+f)().

           -s