루비처럼 간결한 언어 RUST

 

 

use core::rand::RngUtil;

fn main() {
    for ["Alice", "Bob", "Carol"].each |&name| {
        do spawn {
            let v = rand::Rng().shuffle([1, 2, 3]);

for v.each |&num| {
                print(fmt!("%s says: '%d'\n", name, num))
            }
        }
    }
}

 

http://www.rust-lang.org/

Latest Comment

티스토리 툴바