Closed adincebic closed 1 year ago
@swift-ci Please smoke test
@swift-ci please test
Why add @discardableResult
on stablePartition
but not partition
?
Thanks for your contribution, @adincebic! I don't think there are frequent cases where you want to partition a collection but don't care about where the partition is — partitioning is generally used as part of a larger algorithm, and further processing depends on the position of the partition. Feel free to start a thread on the Swift forums if you'd like to discuss further!
Since stablePartition is used frequently in contexts where it's return result isn't needed, I added @discardableResult attribute to both public methods for stablePartition to avoid Xcode's warning about unused result of call to stablePartition.
Checklist