[SR-888] Sequence.minElement() and maxElement() should be protocol requirements (customization points) #43500
Labels
affects ABI
Flag: Affects ABI
feature
A feature request or implementation
good first issue
Good for newcomers
standard library
Area: Standard library umbrella
swift evolution proposal needed
Flag → feature: A feature that warrants a Swift evolution proposal
Additional Detail from JIRA
md5: 38f233c0b4c0d1508b74875d0c159d05
Issue Description:
Some collections naturally maintain sorted order and can implement `minElement()` and `maxElement()` in O(1). Thus, these algorithms should be protocol requirements to allow collection-specific customizations.
Note that `minElement()` and `maxElement()` that take predicates should continue to be pure extensions.
The text was updated successfully, but these errors were encountered: