     self.notify(queue) {
       (result: T) -> Void in
       deferred.setState(.Running)
-      deferred.setValue(task(result))
+      deferred.value = task(result)
     }
     return deferred
   }

    return v
  }

  public var value: T {
    if currentState != DeferredState.Completed.rawValue
    {
      dispatch_group_wait(group, DISPATCH_TIME_FOREVER)
    }
    return v
  }
}



// MARK: Notify: chain asynchronous tasks with input parameters and no return values.


    self.notify(queue) {
      (result: T) -> Void in
      deferred.setState(.Running)
      task(result).notify(queue) { deferred.value = $0 }
    }
    return deferred
  }
