const max = (compare, a, i, j) => {
    if (i >= j) {
        return undefined;
    }