File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1845,7 +1845,7 @@ iter range(int lo, int hi) -> int @{
1845
1845
@}
1846
1846
1847
1847
let int sum = 0;
1848
- for each (int x = range(0,100)) @{
1848
+ for each (int x in range(0,100)) @{
1849
1849
sum += x;
1850
1850
@}
1851
1851
@end example
@@ -2325,7 +2325,7 @@ iter range(int x, int y) -> int @{
2325
2325
@}
2326
2326
@}
2327
2327
2328
- for each (int i = range(5,7)) @{
2328
+ for each (int i in range(5,7)) @{
2329
2329
@dots {};
2330
2330
@}
2331
2331
@end example
@@ -3149,7 +3149,7 @@ fn read_file_lines(&str path) -> vec[str] @{
3149
3149
note path;
3150
3150
vec[str] r;
3151
3151
file f = open_read(path);
3152
- for each (str &s = lines(f)) @{
3152
+ for each (str &s in lines(f)) @{
3153
3153
vec.append(r,s);
3154
3154
@}
3155
3155
ret r;
@@ -3282,7 +3282,7 @@ Example of a foreach loop:
3282
3282
@example
3283
3283
let str txt;
3284
3284
let vec[str] lines;
3285
- for each (&str s = _str.split(txt, "\n")) @{
3285
+ for each (&str s in _str.split(txt, "\n")) @{
3286
3286
vec.push(lines, s);
3287
3287
@}
3288
3288
@end example
You can’t perform that action at this time.
0 commit comments