 /// - parameter combine: a reducing function
 /// - returns: a new `Deferred`
 
-public func reduce<S: Sequence, T, U>(_ deferreds: S, initial: U, combine: @escaping (U,T) throws -> U) -> Deferred<U>
+public func reduce<S: Sequence, T, U>(qos: DispatchQoS = DispatchQoS.current ?? .default, _ deferreds: S,
+                                      initial: U, combine: @escaping (U,T) throws -> U) -> Deferred<U>
   where S.Iterator.Element == Deferred<T>
 {
-  let qos = DispatchQoS(qosClass: DispatchQoS.QoSClass.current ?? .default, relativePriority: 0)
   let queue = DispatchQueue(label: "reduce-sequence", qos: qos)
   let accumulator = Deferred(queue: queue, result: Result.value(initial))
 

/// - parameter deferreds: an array of `Deferred`
/// - returns: a new `Deferred`

public func combine<Value>(_ deferreds: [Deferred<Value>]) -> Deferred<[Value]>
{
  var combined = [Value]()
  combined.reserveCapacity(deferreds.count)

  let reduced = reduce(deferreds, initial: (), combine: { _, value in combined.append(value) })
  return reduced.map { _ in combined }
}



  return first
}

public func firstDetermined<Value, S: Sequence>(_ deferreds: S, cancelOthers: Bool = false) -> Deferred<Deferred<Value>>
  where S.Iterator.Element == Deferred<Value>
