<commit_before>// -------------------------------------------------------------------------- \\
// File: Enumerable.js                                                        \\
// Module: Foundation                                                         \\
// Requires: Core                                                             \\
// Author: <NAME>                                                       \\
// License: © 2010–2013 Opera Software ASA. All rights reserved.              \\
// -------------------------------------------------------------------------- \\

"use strict";

( function ( NS ) {

var defaultComparator = function ( a, b ) {
    return a < b ? -1 : a > b ? 1 : 0;
};
var createCallback = function ( callback, bind ) {
    if ( !bind ) {
        return callback;
    }
    return function ( value, index, enumerable ) {
        callback.call( bind, value, index, enumerable );
    };
};

/**
    Mixin: O.Enumerable

    The Enumerable mixin adds a number of iteration and accessor methods to any
    class with a 'getObjectAt' method that supports numerical values and a 'get'
    method that supports 'length'.

    The native Array type also implements O.Enumerable.
*/
var Enumerable = {

    // :: Accessor methods =====================================================

    /**
        Method: O.Enumerable#first
<commit_msg>Return value from enumerable callback.<commit_after>// -------------------------------------------------------------------------- \\
// File: Enumerable.js                                                        \\
// Module: Foundation                                                         \\
// Requires: Core                                                             \\
// Author: <NAME>                                                       \\
// License: © 2010–2013 Opera Software ASA. All rights reserved.              \\
// -------------------------------------------------------------------------- \\

"use strict";

( function ( NS ) {

var defaultComparator = function ( a, b ) {
    return a < b ? -1 : a > b ? 1 : 0;
};
var createCallback = function ( callback, bind ) {
    if ( !bind ) {
        return callback;
    }
    return function ( value, index, enumerable ) {
        return callback.call( bind, value, index, enumerable );
    };
};

/**
    Mixin: O.Enumerable

    The Enumerable mixin adds a number of iteration and accessor methods to any
    class with a 'getObjectAt' method that supports numerical values and a 'get'
    method that supports 'length'.

    The native Array type also implements O.Enumerable.
*/
var Enumerable = {

    // :: Accessor methods =====================================================

    /**
        Method: O.Enumerable#first

{'fraction_non_alphanumeric': 0.23347857661583152, 'fraction_numerical': 0.007988380537400145, 'mean_word_length': 1.079245283018868, 'pattern_counts': {'":': 0, '<': 7, '<?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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5817439', 'n_tokens_mistral': 587, 'n_tokens_neox': 552, 'n_words': 201}