<commit_before>//
//  Stimulator.swift
//  Pods
//
//  Created by <NAME> on 2015/07/29.
//
//

import Foundation

public protocol Event {
    typealias Responder
    func stimulate(responder: Responder)
}

public extension UIResponder  {
    
    public func stimulate<E: Event>(event: E) -> UIResponder? {
        var responder : UIResponder? = self
        while (responder != nil) {
            if let r = responder as? E.Responder {
                event.stimulate(r)
                return responder
            }
            responder = responder?.nextResponder()
        }<commit_msg>Change return value type UIResponder to Event.Responder<commit_after>//
//  Stimulator.swift
//  Pods
//
//  Created by <NAME> on 2015/07/29.
//
//

import Foundation

public protocol Event {
    typealias Responder
    func stimulate(responder: Responder)
}

public extension UIResponder  {
    
    public func stimulate<E: Event>(event: E) -> E.Responder? {
        var responder : UIResponder? = self
        while (responder != nil) {
            if let responder = responder as? E.Responder {
                event.stimulate(responder)
                return responder
            }
            responder = responder?.nextResponder()
        }
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.012903225806451613, 'mean_word_length': 2.0048426150121066, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4421686', 'n_tokens_mistral': 399, 'n_tokens_neox': 357, 'n_words': 96}