a580e12000-09-27Fredrik Hübinette (Hubbe) #pike __REAL_VERSION__
ea2fe72003-04-12Martin Nilsson #pragma strict_type
a20af62000-09-26Fredrik Hübinette (Hubbe) 
f56aef1999-09-06Fredrik Hübinette (Hubbe) constant defined = __builtin.function_defined;
f321a82000-11-21Johan Sundström 
e5ef062003-04-01Martin Nilsson //! Calls the given function with the @[args] array plus the optional
f321a82000-11-21Johan Sundström //! extra arguments as its arguments and returns the result. //!
e5ef062003-04-01Martin Nilsson //! Most useful in conjunction with @[map], and particularly in combination //! with @[sscanf] with @expr{"...%{...%}..."@} scan strings (which indeed
f321a82000-11-21Johan Sundström //! was what it was invented for in the first place). //!
c00a382001-05-10Henrik Grubbström (Grubba) //! @param args
e5ef062003-04-01Martin Nilsson //! The first arguments the function @[f] expects.
c00a382001-05-10Henrik Grubbström (Grubba) //! @param f
e5ef062003-04-01Martin Nilsson //! The function to apply the arguments on.
c00a382001-05-10Henrik Grubbström (Grubba) //! @param extra
e5ef062003-04-01Martin Nilsson //! Optional extra arguments to send to @[f].
c00a382001-05-10Henrik Grubbström (Grubba) //! @returns
e5ef062003-04-01Martin Nilsson //! Whatever the supplied function @[f] returns.
c00a382001-05-10Henrik Grubbström (Grubba) //!
f321a82000-11-21Johan Sundström //! @example
1952d82003-04-04Martin Nilsson //! @code
f321a82000-11-21Johan Sundström //! class Product(string name, string version) //! { //! string _sprintf() //! { //! return sprintf("Product(%s/%s)", name, version); //! } //! } //! map(({ ({ "pike", "7.1.11" }), //! ({ "whitefish", "0.1" }) }), //! Function.splice_call, Product); //! ({ /* 2 elements */ //! Product(pike/7.1.11), //! Product(whitefish/0.1) //! })
1952d82003-04-04Martin Nilsson //! @endcode
f321a82000-11-21Johan Sundström mixed splice_call(array args, function f, mixed|void ... extra) { return f(@args, @extra); }