I was wondering whether this is legal to do. Could I have something like:
function funct(a, foo(x)) {
...
}
where a
is an array and x
is an integer argument for another function called foo
?
(The idea is to have one function that uses a for loop on the array, and calls that function in the params for every element in the array. The idea is so call this on different functions so elements of two arrays are multiplied and then the sums are added together. For example A[0] * B[0] + A[1] * B[1]
.)