Update Suffix.md

Fix 'Suffix.md'  example code
This commit is contained in:
jerry committed 2024-04-12 16:09:42 +08:00
1 parent 33abb69428
commit ae92f2b33f
1 file changed
+1 -1
+1 -1
View File
@@ -9,7 +9,7 @@ collection until predicate returns `false` and skipping the remaining elements.
This example uses `suffix(while: )` to iterate through collection of integers
from the end until the predicate returns false, in this case when `$0 <= 5`
```swift
(0...10).suffix(while: { $0 > 5 } // == [6,7,8,9,10]
(0...10).suffix(while: { $0 > 5 }) // == [6,7,8,9,10]
```
## Detailed Design