This should look like this:

    return function(ARRAY_ELEM, n);

Any ParseNode is allowed for the arguments - it's not restricted to a column parse node. Type checking will be done for you, based on the annotations you've defined.