You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[stdlib] Document that removeAll(where:) doesn't reorder the remaining elements. (swiftlang#18803)
* Document that removeAll(where:) doesn't reorder the remaining elements.
Per Swift Forums discussion on the topic:
"Does removeAll(where:) on arrays guarantee preserved order of elements?"
* Copy docs from the first default impl up to the protocol requirement.
Per Nate's feedback on PR#18803.
The protocol requirement was missing a few extra sentences and a
code example.
* Fix a code example that would fail to remove negative odd integers.
Per feedback on the forums from Jens,
swap `== 1` with `!= 0` so that negative odd numbers would be
removed, too, if the example were modified to include some negative
numbers in the input array.
0 commit comments