<commit_before>//
//  StartWith.swift
//  RxCocoa
//
//  Created by <NAME> on 4/6/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation
import RxSwift

class StartWith<Element>: Producer<Element> {
    let element: Element
    let source: Observable<Element>
    
    init(source: Observable<Element>, element: Element) {
        self.source = source
        self.element = element
        super.init()
    }
    
    override func subscribe<O : ObserverType where O.Element == Element>(observer: O) -> Disposable {
        sendNext(observer, element)
        
        return source.subscribeSafe(observer)
    }
}<commit_msg>Fixes run method for StartWith.<commit_after>//
//  StartWith.swift
//  RxCocoa
//
//  Created by <NAME> on 4/6/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation
import RxSwift

class StartWith<Element>: Producer<Element> {
    let element: Element
    let source: Observable<Element>
    
    init(source: Observable<Element>, element: Element) {
        self.source = source
        self.element = element
        super.init()
    }
    
    override func run<O : ObserverType where O.Element == Element>(observer: O, cancel: Disposable, setSink: (Disposable) -> Void) -> Disposable {
        sendNext(observer, element)
        
        return source.subscribeSafe(observer)
    }
}
{'fraction_non_alphanumeric': 0.11665443873807776, 'fraction_numerical': 0.01173881144534116, 'mean_word_length': 2.6373333333333333, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 20, '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': '3520003', 'n_tokens_mistral': 428, 'n_tokens_neox': 395, 'n_words': 109}