<commit_before>//
//  Collection+Siesta.swift
//  Siesta
//
//  Created by Paul on 2015/7/19.
//  Copyright © 2016 Bust Out Solutions. All rights reserved.
//

import Foundation

internal extension Collection
    {
    func any(match predicate: (Iterator.Element) -> Bool) -> Bool
        {
        for elem in self
            where predicate(elem)
                { return true }
        return false
        }

    func all(match predicate: (Iterator.Element) -> Bool) -> Bool
        {
        return !any { !predicate($0) }
        }
    }
<commit_msg>Use stdlib’s contains(where:), but keep any(match:) for readability<commit_after>//
//  Collection+Siesta.swift
//  Siesta
//
//  Created by Paul on 2015/7/19.
//  Copyright © 2016 Bust Out Solutions. All rights reserved.
//

import Foundation

internal extension Collection
    {
    // Just for readability
    func any(match predicate: (Iterator.Element) -> Bool) -> Bool
        { return contains(where: predicate) }

    func all(match predicate: (Iterator.Element) -> Bool) -> Bool
        { return !contains(where: { !predicate($0) }) }
    }

{'fraction_non_alphanumeric': 0.12285456187895212, 'fraction_numerical': 0.02168021680216802, 'mean_word_length': 2.2492668621700878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '360993', 'n_tokens_mistral': 355, 'n_tokens_neox': 320, 'n_words': 97}