Skip to content

Commit 1dae2d4

Browse files
committed
Improve .times example code usage in README
1 parent f32b1e1 commit 1dae2d4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ Please have a look at the UsageExamples.playground for a complete list of featur
1414

1515
#### .times
1616

17-
``` Swift
18-
3.times{ array.append("Hello World!") } // => ["Hello World!", "Hello World!", "Hello World!"]
19-
3.times{ array.append("Hello World #\($0)!") } // => ["Hello World #1!", "Hello World #2!", "Hello World #3!"]
17+
```
18+
3.times{ array.append("Hello World!") }
19+
// => ["Hello World!", "Hello World!", "Hello World!"]
20+
```
21+
22+
```
23+
3.times{ array.append("Hello World #\($0)!") }
24+
// => ["Hello World #1!", "Hello World #2!", "Hello World #3!"]
2025
```
2126

2227
## Contributing

0 commit comments

Comments
 (0)