             if case .Pending = self.state {
                 self.state = .Fulfilled(value)
 
-                for cb in self.onFulfilled {
+                for cb in self.fulfillCallbacks {
                     cb(value)
                 }
 
-                self.onFulfilled.removeAll(keepCapacity: false)
+                self.fulfillCallbacks.removeAll(keepCapacity: false)
             }
         }
     }


    private var state: PromiseState<ValueType> = .Pending

    private var onFulfilled: [(ValueType) -> Void] = []

    private var onRejected: [(NSError) -> Void] = []

    public init() {


    }

    public func then(dispatchQueue: dispatch_queue_t, _ onFulfilled: (ValueType -> T)?, _ onRejected: (NSError -> Void)? = nil) -> Promise<T> {
        // If onFulfilled is not nil, the compiler should choose generic function.
        assert( onFulfilled == nil )

        let nextPromise = Promise<T>()
