static-content/HorizonRenderer.js
function reducer(individualSeries, initialFunction, reductionFunction) {
                        if (individualSeries.length == 0) {
                            return NaN;
                        }
                        var initial = initialFunction(individualSeries[0][1]);
                        var i=1;
                        for (; initial==null && i<individualSeries.length; i++) {
                            initial = initialFunction(individualSeries[i][1]);
                        }
                        for (; i<individualSeries.length; i++) {
                            if (individualSeries[i][1] != null) {
                                initial = reductionFunction(initial, individualSeries[i][1]);
                            }
                        }
                        return initial;
                    }
function reducer(individualSeries, initialFunction, reductionFunction) {
                        if (individualSeries.length == 0) {
                            return NaN;
                        }
                        var initial = initialFunction(individualSeries[0][1]);
                        var i=1;
                        for (; initial==null && i<individualSeries.length; i++) {
                            initial = initialFunction(individualSeries[i][1]);
                        }
                        for (; i<individualSeries.length; i++) {
                            if (individualSeries[i][1] != null) {
                                initial = reductionFunction(initial, individualSeries[i][1]);
                            }
                        }
                        return initial;
                    }
function reducer ( individualSeries , initialFunction , reductionFunction ) { if ( individualSeries . length == 0 ) { return NaN ; } var initial = initialFunction ( individualSeries [ 0 ] [ 1 ] ) ; var i = 1 ; for ( ; initial == null && i < individualSeries . length ; i ++ ) { initial = initialFunction ( individualSeries [ i ] [ 1 ] ) ; } for ( ; i < individualSeries . length ; i ++ ) { if ( individualSeries [ i ] [ 1 ] != null ) { initial = reductionFunction ( initial , individualSeries [ i ] [ 1 ] ) ; } } return initial ; }
do sorting before we parse
do sorting before we parse