<commit_before>//
//  Collection+PrefixWhile.swift
//  SwiftLint
//
//  Created by <NAME> on 06/14/17.
//  Copyright © 2017 Realm. All rights reserved.
//

import Foundation

#if swift(>=3.1)
#else
    extension Collection {
        // from https://github.com/apple/swift/blob/4b0597a8/stdlib/public/core/Collection.swift#L1558
        func prefix(while predicate: (Iterator.Element) throws -> Bool) rethrows -> SubSequence {
            var end = startIndex
            while try end != endIndex && predicate(self[end]) {
                formIndex(after: &end)
            }
            return self[startIndex..<end]
        }
    }
#endif<commit_msg>change an empty `#if` body for `#if !`<commit_after>//
//  Collection+PrefixWhile.swift
//  SwiftLint
//
//  Created by <NAME> on 06/14/17.
//  Copyright © 2017 Realm. All rights reserved.
//

import Foundation

#if !swift(>=3.1)
extension Collection {
    // from https://github.com/apple/swift/blob/4b0597a8/stdlib/public/core/Collection.swift#L1558
    func prefix(while predicate: (Iterator.Element) throws -> Bool) rethrows -> SubSequence {
        var end = startIndex
        while try end != endIndex && predicate(self[end]) {
            formIndex(after: &end)
        }
        return self[startIndex..<end]
    }
}
#endif
{'fraction_non_alphanumeric': 0.1378504672897196, 'fraction_numerical': 0.03426791277258567, 'mean_word_length': 2.4266666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '6888934', 'n_tokens_mistral': 440, 'n_tokens_neox': 397, 'n_words': 95}