  contained within an observable.
  */
 
+import Foundation
+
 public class Store<ObservableProperty: ObservablePropertyType>: StoreType where ObservableProperty.ValueType: StateType {
 
     public typealias StoreMiddleware = Middleware<ObservableProperty.ValueType>


    public var observable: ObservableProperty!

    private var isDispatching = false

    private var disposeBag = SubscriptionReferenceBag()


    }

    private func defaultDispatch(action: Action) {
        guard dispatchingLock.try() else {
            raiseFatalError("ReSwift:IllegalDispatchFromReducer - Reducers may not dispatch actions.")
        }
        observable.value = reducer.run(action: action, state: observable.value)
        dispatchingLock.unlock()
    }

    @discardableResult
