function reduceLeft(array, f, initial) {
        if (array) {
            var count = array.length;
            if (count > 0) {
                var pos = 0;
                var result = arguments.length <= 2 ? array[pos++] : initial;
                while (pos < count) {
                    result = f(result, array[pos++]);
                }
                return result;
            }
        }
        return initial;
    }
Performs a binary search, finding the index at which 'value' occurs in 'array'.
If no such index is found, returns the 2's-complement of first index at which
number[index] exceeds number.
@param array A sorted array whose first element must be no larger than number
@param number The value to be searched for in the array.