rust/src/test/run-pass/foreach-simple.rs
2011-07-27 15:54:33 +02:00

10 lines
194 B
Rust

// -*- rust -*-
fn main() { for each i: int in first_ten() { log "main"; } }
iter first_ten() -> int {
let i: int = 90;
while i < 100 { log "first_ten"; log i; put i; i = i + 1; }
}