Q:

How to make sense of `f(array[i], i, array)` found in `d3.min()` source code?

I am new to d3 and try to learn it by reading its source code. I start with probably the simplest function d3.min(). However, my hair was torn apart by a seemingly very common code f(array[i], i, array). 

I think f() is supposed to be a function;
array[i] is accessing the element of array at index i;
i is an index of the array;
array is an array of numbers given by user. 

If the above 4 understandings are correct, then f() as a function given by the user, must have all three of array[i], i, array as its arguments. But we don't have to use all of these arguments, right? 
What is the point of this f()? Can anyone offer any useful example/usage of d3.min(array, f) in which f is not null? 

A:

There is a little confusion here. First, d3.min and d3.max can be used with or without an accessor. In the API:

d3.min(array[, accessor])

This square bracket before the comma means that it is optional, not compulsory. So, you can have a simple:
var something = d3.max(someArray);

Or, using an accessor (as you asked, an example where the accessor is not null):
var something = d3.max(data, function(d) {
    return d.foo
});

Now we come to your question: you can see in the code above that the accessor function has only 1 argument.
The example you provided is the source code D3 uses to deal with the accessor function. If you look at the code, you'll see array[i], i and array. Those 3 arguments are not provided by the user, but passed to the accessor function  by the D3 source code.
Remember that in JS you can pass more arguments than parameters or less arguments than parameters.

