         let identifier = UUID()
         observers[identifier] = observer
         
-        let subscription = Subscription { [weak self] in
+        let subscription = AnySubscription { [weak self] in
             self?.removeObserver(for: identifier)
         }
         


public extension Observable {
    
    /// Represents a subscription to an `Observable`.
    struct Subscription {
        
        private let _unsubscribe: () -> Void
        
        fileprivate init(unsubscribeAction: @escaping () -> Void) {
            _unsubscribe = unsubscribeAction
        }
        
        /// Cancels the subscription.
        public func unsubscribe() {
            _unsubscribe()
        }
    }
    
}

public extension Observable {

import Foundation



/// Represents a changing stream of values that can be observed.
public final class Observable<T> {
