         }
     }
   
-    private func publishStateChange(subscriber: AnySubscriber?, selector: ((ReactorState) -> Any)?) {
-        if let selector = selector {
-            subscriber?._update(with: selector(self.state))
-        } else {
-            subscriber?._update(with: self.state)
-        }
-    }
   
     public init(state: ReactorState, middlewares: [AnyMiddleware] = []) {
         self.state = state

import Foundation

public protocol Event {}

public protocol State {
    mutating func react(to event: Event)
}

public protocol AnyMiddleware {
    func _process(event: Event, state: Any)

public struct Middlewares<ReactorState: State> {
    private(set) var middleware: AnyMiddleware
}


// MARK: - Subscribers

public protocol AnySubscriber: class {
    func _update(with state: Any)
