File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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 @{
18451845@}
18461846
18471847let int sum = 0;
1848- for each (int x = range(0,100)) @{
1848+ for each (int x in range(0,100)) @{
18491849 sum += x;
18501850@}
18511851@end example
@@ -2325,7 +2325,7 @@ iter range(int x, int y) -> int @{
23252325 @}
23262326@}
23272327
2328- for each (int i = range(5,7)) @{
2328+ for each (int i in range(5,7)) @{
23292329 @dots {};
23302330@}
23312331@end example
@@ -3149,7 +3149,7 @@ fn read_file_lines(&str path) -> vec[str] @{
31493149 note path;
31503150 vec[str] r;
31513151 file f = open_read(path);
3152- for each (str &s = lines(f)) @{
3152+ for each (str &s in lines(f)) @{
31533153 vec.append(r,s);
31543154 @}
31553155 ret r;
@@ -3282,7 +3282,7 @@ Example of a foreach loop:
32823282@example
32833283let str txt;
32843284let vec[str] lines;
3285- for each (&str s = _str.split(txt, "\n")) @{
3285+ for each (&str s in _str.split(txt, "\n")) @{
32863286 vec.push(lines, s);
32873287@}
32883288@end example
You can’t perform that action at this time.
0 commit comments