mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Merge pull request #2086 from nikibobi/patch-1
fix parallelism example typo
This commit is contained in:
commit
b2113480a4
@ -254,7 +254,7 @@ void main() {
|
|||||||
// Use an index, access every array element by reference (because we're
|
// Use an index, access every array element by reference (because we're
|
||||||
// going to change each element) and just call parallel on the array!
|
// going to change each element) and just call parallel on the array!
|
||||||
foreach(i, ref elem; parallel(arr)) {
|
foreach(i, ref elem; parallel(arr)) {
|
||||||
ref = sqrt(i + 1.0);
|
elem = sqrt(i + 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user