pike.git / lib / modules / Function.pmod

version» Context lines:

pike.git/lib/modules/Function.pmod:178:      private function handle_error = master()->handle_error;      //! Creates a composite function of the provided functions. The   //! composition function of f() and g(), q(x)=f(g(x)), is created by   //! @expr{function q = Function.composite(f, g);@}.   //!   //! @example   //! @code   //! map(input/",", - //! Function.composite(String.trim_all_whites, upper_case)); + //! Function.composite(String.trim, upper_case));   //! @endcode   function composite(function ... f)   {    return lambda(mixed args)    {    for(int i; i<sizeof(f); i++)    args = f[-i-1](args);    return args;    };   }