Sha256: 4a692a24ace459bda8b863f2056a6becf7b2b2477c93a8dcd2e44c93b493c501

Contents?: true

Size: 495 Bytes

Versions: 17

Compression:

Stored size: 495 Bytes

Contents

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 + 1))
            }
        }
    }
}

fn map<T, U>(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] {
    let mut accumulator = ~[];
    for vec::each(vector) |element| {
        accumulator.push(function(element));
    }
    return accumulator;
}

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
agile-proxy-0.1.24 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.23 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.22 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.21 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.20 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.19 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.18 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.13 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.12 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.11 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.10 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.9 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.8 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.7 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.6 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.5 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs
agile-proxy-0.1.4 assets/ui/bower_components/ace-builds/demo/kitchen-sink/docs/rust.rs