[SR-10487] Misleading about the swift doc. #52887
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
documentation
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: a2b9e0916b50d3b08aeae4427512a1f2
Issue Description:
for the Array method:
the Doc gives an example:
why it uses `numbers.endIndex` for the `limit` param, it obvious wrong, we should use `numbers.endIndex-1`, it works here because the `distance` param is 4, and it will crash if the `distance` is 5.
And if I search `limitedBy` in the swift project, there are a lot of places use `endIndex` as the param.
I think these are bad examples, we should fix it.
The text was updated successfully, but these errors were encountered: