---
title: "init(upstream:predicate:)"
framework: combine
role: symbol
role_heading: Initializer
path: "combine/publishers/dropwhile/init(upstream:predicate:)"
---

# init(upstream:predicate:)

Creates a publisher that omits elements from an upstream publisher until a given closure returns false.

## Declaration

```swift
init(upstream: Upstream, predicate: @escaping (Publishers.DropWhile<Upstream>.Output) -> Bool)
```

## Parameters

- `upstream`: The publisher from which this publisher receives elements.
- `predicate`: The closure that indicates whether to drop the element.
