mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-22 04:10:39 +00:00
Update Suffix.md
Fix 'Suffix.md' example code
This commit is contained in:
1 parent
33abb69428
commit
ae92f2b33f
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user