---
title: min()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/asyncstream/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

### Finding Elements

- [contains(_:)](swift/asyncstream/contains(_:).md)
- [contains(where:)](swift/asyncstream/contains(where:).md)
- [allSatisfy(_:)](swift/asyncstream/allsatisfy(_:).md)
- [first(where:)](swift/asyncstream/first(where:).md)
- [min(by:)](swift/asyncstream/min(by:).md)
- [max()](swift/asyncstream/max().md)
- [max(by:)](swift/asyncstream/max(by:).md)
