             transform.notify(queue: queue) { applyTransform(value, $0, resolver) }
             resolver.retainSource(transform)
           }
-        }
-        catch {
+
+        case .failure(let error):
           resolver.resolve(error: error)
         }
       }

  /// - parameter value: the value to be transformed for a new `Deferred`

  public func apply<Other>(queue: DispatchQueue? = nil,
                           transform: Deferred<(_ value: Success) throws -> Other>) -> Deferred<Other>
  {
    func applyTransform(_ value: Success,
                        _ transform: (Result<(Success) throws -> Other, Error>),
                        _ resolver: Resolver<Other, Error>)
    {
      guard resolver.needsResolution else { return }
      resolver.beginExecution()
      do {
        let transform = try transform.get()
        let transformed = try transform(value)
        resolver.resolve(value: transformed)
      }
      catch {
        resolver.resolve(error: error)
      }
    }


  /// - parameter value: the value to be transformed for a new `Deferred`

  public func apply<Other>(qos: DispatchQoS,
                           transform: Deferred<(_ value: Success) -> Other, Never>) -> Deferred<Other, Failure>
  {
    let queue = DispatchQueue(label: "deferred-apply", qos: qos)
    return apply(queue: queue, transform: transform)
  }
}

