[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: looking for ``apply'' function
- From: Thomas Hafner <thomas@...>
- Date: 17 Dec 2006 16:45:53 +0100
Hello,
is there some function which behaves according to the following
signature and semantics description?
function apply(f, a) {
-- f is a function. a is an array. Depending on the dimension of a,
-- apply shall return
-- f() -- for dimension == 0 (empty array) resp.
-- f(a[1]) -- for dimension == 1 resp.
-- f(a[1], a[2]) -- for dimension == 2 resp.
-- f(a[1], a[2], a[3]) -- for dimension == 3 resp.
-- ...
}
Regards
Thomas