Functions usually take parameters and when they do, order matters.
In our divide function, swapping the parameters x and y is tantamount to swapping dividend and divisor.
In our changeArrayElements function, however, the nature of the two parameters are so different that it might be reasonable to assume that the function would know which argument to use as a function and which to use as an array. Not so.
Each parameter is treated in the order each appears in the arguments list. So the interpreter will go ahead and try to iterate over a callback function and apply an array to each “element” of of a callback function.
Bottom line, keep your arguments in order, which is especially important when currying.