<commit_before>public extension SequenceType {
  
  /// Returns the first element in self that satisfies a predicate, or nil if it doesn't
  /// exist
  
  func first(@noescape predicate: Generator.Element -> Bool) -> Generator.Element? {
    for el in self where predicate(el) { return el }
    return nil
  }
}
  
public extension CollectionType {

  
  /// Returns the last element in self that satisfies a predicate, or nil if it doesn't
  /// exist
  
  func last(@noescape predicate: Generator.Element -> Bool) -> Generator.Element? {
    for el in lazy(self).reverse() where predicate(el) { return el }
    return nil
  }
}

public extension SequenceType {
  
  /// Returns the number of elements in `self` that satisfy `predicate`
  
  func count(predicate: Generator.Element -> Bool) -> Int {
    var i = 0
    for el in self where predicate(el) { ++i }
    return i
  }
}<commit_msg>added @noescape<commit_after>public extension SequenceType {
  
  /// Returns the first element in self that satisfies a predicate, or nil if it doesn't
  /// exist
  
  func first(@noescape predicate: Generator.Element -> Bool) -> Generator.Element? {
    for el in self where predicate(el) { return el }
    return nil
  }
}
  
public extension CollectionType {

  
  /// Returns the last element in self that satisfies a predicate, or nil if it doesn't
  /// exist
  
  func last(@noescape predicate: Generator.Element -> Bool) -> Generator.Element? {
    for el in lazy(self).reverse() where predicate(el) { return el }
    return nil
  }
}

public extension SequenceType {
  
  /// Returns the number of elements in `self` that satisfy `predicate`
  
  func count(@noescape predicate: Generator.Element -> Bool) -> Int {
    var i = 0
    for el in self where predicate(el) { ++i }
    return i
  }
}
{'fraction_non_alphanumeric': 0.09899888765294772, 'fraction_numerical': 0.0011123470522803114, 'mean_word_length': 2.9023861171366594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1752083', 'n_tokens_mistral': 544, 'n_tokens_neox': 509, 'n_words': 202}