<commit_before>//
//  Animation.swift
//  Slaminate
//
//  Created by <NAME> on 06/02/16.
//  Copyright © 2016 Trenskow.io. All rights reserved.
//

import Foundation

var ongoingAnimations = [Animation]()

public func +(lhs: Animation, rhs: Animation) -> Animation {
    return lhs.and(animation: rhs)
}

public func |(lhs: Animation, rhs: Animation) -> Animation {
    return lhs.then(animation: rhs)
}

public class Animation: NSObject {
    
    init(duration: NSTimeInterval) {
        self.duration = duration
        super.init()
        ongoingAnimations.append(self)
        performSelector(#selector(Animation.go as (Animation) -> () -> Animation), withObject: nil, afterDelay: 0.0, inModes: [NSRunLoopCommonModes])
    }
    
    public convenience override init() {
        self.init(duration: 0.0)
    }
    
    @objc(isFinished) public var finished: Bool = false<commit_msg>Added the += and |= operators.<commit_after>//
//  Animation.swift
//  Slaminate
//
//  Created by <NAME> on 06/02/16.
//  Copyright © 2016 Trenskow.io. All rights reserved.
//

import Foundation

var ongoingAnimations = [Animation]()

public func +(lhs: Animation, rhs: Animation) -> Animation {
    return lhs.and(animation: rhs)
}

public func |(lhs: Animation, rhs: Animation) -> Animation {
    return lhs.then(animation: rhs)
}

public func +=(inout lhs: Animation, rhs: Animation) {
    lhs = lhs.and(animation: rhs)
}

infix operator |= { associativity right precedence 90 assignment }
public func |=(inout lhs: Animation, rhs: Animation) {
    lhs = lhs.then(animation: rhs)
}

public class Animation: NSObject {
    
    init(duration: NSTimeInterval) {
        self.duration = duration
        super.init()
        ongoingAnimations.append(self)
        performSelector(#selector(Animation.go as (Animation) -> () -> Animation), withObject: nil, afterDelay: 0.0, inModes: [NSRunLoopCommonModes])
    }
    
    public convenience override init() {
        self.init(duration: 0.0)
    }
    
    @objc(isFinished) public var finished: Bool = false
{'fraction_non_alphanumeric': 0.12750366389838788, 'fraction_numerical': 0.014655593551538837, 'mean_word_length': 3.1373737373737374, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1041695', 'n_tokens_mistral': 682, 'n_tokens_neox': 632, 'n_words': 173}