 }
 
 extension Publisher where Self: Dispatch {
+    /**
+     Subscribes a `Subscriber` that is compatible with this `Publisher`.
+     - parameter subscriber The compatible `Subscriber`.
+     - returns A `dispatch` function and an `unsubscribe` handle, encapsulated.
+    **/
     func connection <T: Subscriber where T.Publishing == Publishing> (to subscriber: T) -> StateConnection {
         let dispatch = { self.dispatch($0) }
         let unsubscribe = self.subscribe(subscriber: subscriber)

    }
}

public protocol Dispatch {
    func dispatch(action: Action)
}

extension Dispatch {
    public func dispatch(thunk: (Action -> Void) -> Void) {
        thunk { self.dispatch($0) }
    }
}

public protocol Action {}

public protocol Publisher {
    associatedtype Publishing
    func subscribe(subscription: Publishing -> Void) -> Void -> Void
}

extension Publisher {
    public func subscribe <T: Subscriber where T.Publishing == Publishing> (subscriber subscriber: T) -> Void -> Void {
        return subscribe { newState in
            subscriber.receive(subscriber.select(newState))

    
    /**
     Registers a handler that's called when state changes
     - parameter subscription A closure that's called whenever there's a change to the state in hold.
     - returns A closure that unsubscribes the provided subscription.
     **/
    public func subscribe(subscription: State -> Void) -> Void -> Void {
        let token = NSUUID().UUIDString
