---
title: min()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/taskgroup/min()
---

# min()

Returns the minimum element in an asynchronous sequence of comparable elements.

## Declaration

```swift
@warn_unqualified_access func min() async rethrows -> Self.Element?
```

## Return Value

Return Value The sequence’s minimum element. If the sequence has no elements, returns nil.

## Discussion

Discussion In this example, an asynchronous sequence called Counter produces Int values from 1 to 10. The min() method returns the minimum value of the sequence. let min = await Counter(howHigh: 10)     .min() print(min ?? "none") // Prints "1"

## 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)
- [dropFirst(_:)](swift/taskgroup/dropfirst(_:).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)
