2011-08-01 15:46:17 +02:00
|
|
|
iter x() -> {x: int, y: int} {
|
|
|
|
let i = 0;
|
2011-08-19 15:16:48 -07:00
|
|
|
while i < 40 { put {x: i, y: 30 - i}; i += 10; }
|
2011-08-01 15:46:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 15:16:48 -07:00
|
|
|
for each {x: x, y: y}: {x: int, y: int} in x() { assert (x + y == 30); }
|
2011-08-01 15:46:17 +02:00
|
|
|
}
|