---
title: "dropFirst(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/taskgroup/dropfirst(_:)"
---

# dropFirst(_:)

Omits a specified number of elements from the base asynchronous sequence, then passes through all remaining elements.

## Declaration

```swift
func dropFirst(_ count: Int = 1) -> AsyncDropFirstSequence<Self>
```

## Parameters

- `count`: The number of elements to drop from the beginning of the sequence. count must be greater than or equal to zero.

## Return Value

Return Value An asynchronous sequence that drops the first count elements from the base sequence.

## Discussion

Discussion Use dropFirst(_:) when you want to drop the first n elements from the base sequence and pass through the remaining elements. In this example, an asynchronous sequence called Counter produces Int values from 1 to 10. The dropFirst(_:) method causes the modified sequence to ignore the values 1 through 3, and instead emit 4 through 10: for await number in Counter(howHigh: 10).dropFirst(3) {     print(number, terminator: " ") } // Prints "4 5 6 7 8 9 10 " If the number of elements to drop exceeds the number of elements in the sequence, the result is an empty sequence.

## See Also

### Accessing an Asynchronous Sequence of Results

- [makeAsyncIterator()](swift/taskgroup/makeasynciterator().md)
- [allSatisfy(_:)](swift/taskgroup/allsatisfy(_:).md)
- [compactMap(_:)](swift/taskgroup/compactmap(_:)-944od.md)
- [compactMap(_:)](swift/taskgroup/compactmap(_:)-7mgj1.md)
- [contains(_:)](swift/taskgroup/contains(_:).md)
- [contains(where:)](swift/taskgroup/contains(where:).md)
- [drop(while:)](swift/taskgroup/drop(while:).md)
- [filter(_:)](swift/taskgroup/filter(_:).md)
- [first(where:)](swift/taskgroup/first(where:).md)
- [flatMap(_:)](swift/taskgroup/flatmap(_:)-vhi3.md)
- [map(_:)](swift/taskgroup/map(_:)-58nsr.md)
- [map(_:)](swift/taskgroup/map(_:)-4a4kq.md)
- [max()](swift/taskgroup/max().md)
- [max(by:)](swift/taskgroup/max(by:).md)
- [min()](swift/taskgroup/min().md)
