<commit_before>// Type definitions for Underscore 1.4
// Project: http://underscorejs.org/
// Definitions by: <NAME> <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped


interface UnderscoreWrappedObject {
    value () : any;
	filter(arg?) : any;
}

interface TemplateSettings {
    evaluate?: RegExp;
    interpolate?: RegExp;
    escape?: RegExp;
}

interface ListIterator {
    (value, key, list?): void;
}

interface ObjectIterator {
    (element, index, list?): void;
}

// Common interface between Arrays and jQuery objects
interface List {
    [index: number]: any;
    length: number;
}

interface UnderscoreStatic {
	(arg?:any) : any;

    /****
     Collections
    *****/
    each(list: List, iterator: ListIterator, context?: any): any[];
    each(object: any, iterator: ObjectIterator, context?: any): any[];
    forEach(list: List, iterator: ObjectIterator, context?: any): any[];
    forEach(object: any, iterator: ListIterator, context?: any): any[];

    map(list: List, iterator: ListIterator, context?: any): any[];
    map(object: any, iterator: ObjectIterator, context?: any): any[];
    collect(list: List, iterator: ListIterator, context?: any): any[];
    collect(object: any, iterator: ObjectIterator, context?: any): any[];

    reduce(list: List, iterator: any, memo: any, context?: any): any[];
    reduce(list: any[], iterator: any, memo: any, context?: any): any[];
    inject(list: List, iterator: any, memo: any, context?: any): any[];
    inject(list: any[], iterator: any, memo: any, context?: any): any[];
    foldl(list: List, iterator: any, memo: any, context?: any): any[];
    foldl(list: any[], iterator: any, memo: any, context?: any): any[];

    reduceRight(list: List, iterator: any, memo: any, context?: any): any[];
    reduceRight(list: any[], iterator: any, memo: any, context?: any): any[];
    foldr(list: List, iterator: any, memo: any, context?: any): any[];
    foldr(list: any[], iterator: any, memo: any, context?: any): any[];

    find(list: List, iterator: any, context?: any): any;
    find(list: any[], iterator: any, context?: any): any;
    detect(list: List, iterator: any, context?: any): any;
    detect(list: any[], iterator: any, context?: any): any;

    filter(list: List, iterator: any, context?: any): any[];<commit_msg>updated return types of reduce/foldl/inject<commit_after>// Type definitions for Underscore 1.4
// Project: http://underscorejs.org/
// Definitions by: <NAME> <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped


interface UnderscoreWrappedObject {
    value () : any;
	filter(arg?) : any;
}

interface TemplateSettings {
    evaluate?: RegExp;
    interpolate?: RegExp;
    escape?: RegExp;
}

interface ListIterator {
    (value, key, list?): void;
}

interface ObjectIterator {
    (element, index, list?): void;
}

// Common interface between Arrays and jQuery objects
interface List {
    [index: number]: any;
    length: number;
}

interface UnderscoreStatic {
	(arg?:any) : any;

    /****
     Collections
    *****/
    each(list: List, iterator: ListIterator, context?: any): any[];
    each(object: any, iterator: ObjectIterator, context?: any): any[];
    forEach(list: List, iterator: ObjectIterator, context?: any): any[];
    forEach(object: any, iterator: ListIterator, context?: any): any[];

    map(list: List, iterator: ListIterator, context?: any): any[];
    map(object: any, iterator: ObjectIterator, context?: any): any[];
    collect(list: List, iterator: ListIterator, context?: any): any[];
    collect(object: any, iterator: ObjectIterator, context?: any): any[];

    reduce(list: List, iterator: any, memo: any, context?: any): any;
    reduce(list: any[], iterator: any, memo: any, context?: any): any;
    inject(list: List, iterator: any, memo: any, context?: any): any;
    inject(list: any[], iterator: any, memo: any, context?: any): any;
    foldl(list: List, iterator: any, memo: any, context?: any): any;
    foldl(list: any[], iterator: any, memo: any, context?: any): any;

    reduceRight(list: List, iterator: any, memo: any, context?: any): any[];
    reduceRight(list: any[], iterator: any, memo: any, context?: any): any[];
    foldr(list: List, iterator: any, memo: any, context?: any): any[];
    foldr(list: any[], iterator: any, memo: any, context?: any): any[];

    find(list: List, iterator: any, context?: any): any;
    find(list: any[], iterator: any, context?: any): any;
    detect(list: List, iterator: any, context?: any): any;
    detect(list: any[], iterator: any, context?: any): any;

    filter(list: List, iterator: any, context?: any): any[];
{'fraction_non_alphanumeric': 0.17135549872122763, 'fraction_numerical': 0.0008525149190110827, 'mean_word_length': 4.302824858757062, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '487890', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1453, 'n_words': 483}