File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 16a58855559d8a9d170de94d0452d27785f30729
2
+ refs/heads/master: db84029268b9bbebe153d0a99920089126f79154
Original file line number Diff line number Diff line change @@ -2008,7 +2008,7 @@ iter range(lo: int, hi: int) -> int @{
2008
2008
@}
2009
2009
2010
2010
let sum: int = 0;
2011
- for each ( x: int in range(0,100) ) @{
2011
+ for each x: int in range(0,100) @{
2012
2012
sum += x;
2013
2013
@}
2014
2014
@end example
@@ -2464,7 +2464,7 @@ iter range(x: int, y: int) -> int @{
2464
2464
@}
2465
2465
@}
2466
2466
2467
- for each ( i: int in range(5,7) ) @{
2467
+ for each i: int in range(5,7) @{
2468
2468
@dots {};
2469
2469
@}
2470
2470
@end example
@@ -3172,7 +3172,7 @@ fn read_file_lines(path: str) -> [str] @{
3172
3172
note path;
3173
3173
let r: [str];
3174
3174
let f: file = open_read(path);
3175
- for each ( s: str in lines(f) ) @{
3175
+ for each s: str in lines(f) @{
3176
3176
vec::append(r,s);
3177
3177
@}
3178
3178
ret r;
@@ -3271,7 +3271,7 @@ Example a for loop:
3271
3271
@example
3272
3272
let v: [foo] = [a, b, c];
3273
3273
3274
- for (foo e in v) @{
3274
+ for e: foo in v @{
3275
3275
bar(e);
3276
3276
@}
3277
3277
@end example
@@ -3291,7 +3291,7 @@ Example of a foreach loop:
3291
3291
@example
3292
3292
let txt: str;
3293
3293
let lines: [str];
3294
- for each ( s: str in str::split(txt, "\n") ) @{
3294
+ for each s: str in str::split(txt, "\n") @{
3295
3295
vec::push(lines, s);
3296
3296
@}
3297
3297
@end example
You can’t perform that action at this time.
0 commit comments