<commit_before>define(['./forEach'], function (forEach) {

    var _nativeReduceRight = Array.prototype.reduceRight;

    /**
     * ES5 Array.reduceRight
     * @author <NAME>
     * @version 0.1.0 (2011/11/15)
     */
    function reduceRight(arr, fn, initVal) {
        var hasInit = typeof initVal !== 'undefined';
        if (_nativeReduceRight && arr.reduceRight === _nativeReduceRight) {
            return hasInit ? arr.reduceRight(fn, initVal) : arr.reduceRight(fn);
        } else {
            if (!arr.length && !hasInit) {
                throw new Error('reduce of empty array with no initial value');
            }
            var result = initVal,
                i = arr.length,
                val;
            while (i-- >= 0) {
                val = arr[i];
                if (typeof val !== 'undefined') {
                    if (! hasInit) {
                        result = val;
                        hasInit = true;
                    } else {
                        result = fn(result, val, i, arr);
                    }
                }
            }
            return result;
        }<commit_msg>ops, reduceRight doesn't depend on forEach...<commit_after>define(function () {

    var _nativeReduceRight = Array.prototype.reduceRight;

    /**
     * ES5 Array.reduceRight
     * @author <NAME>
     * @version 0.1.1 (2011/11/15)
     */
    function reduceRight(arr, fn, initVal) {
        var hasInit = typeof initVal !== 'undefined';
        if (_nativeReduceRight && arr.reduceRight === _nativeReduceRight) {
            return hasInit ? arr.reduceRight(fn, initVal) : arr.reduceRight(fn);
        } else {
            if (!arr.length && !hasInit) {
                throw new Error('reduce of empty array with no initial value');
            }
            var result = initVal,
                i = arr.length,
                val;
            while (i-- >= 0) {
                val = arr[i];
                if (typeof val !== 'undefined') {
                    if (! hasInit) {
                        result = val;
                        hasInit = true;
                    } else {
                        result = fn(result, val, i, arr);
                    }
                }
            }
            return result;
        }
{'fraction_non_alphanumeric': 0.11433597185576078, 'fraction_numerical': 0.011433597185576077, 'mean_word_length': 1.2303921568627452, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6926284', 'n_tokens_mistral': 625, 'n_tokens_neox': 580, 'n_words': 151}