init
This commit is contained in:
commit
5cb4facc48
8 changed files with 684 additions and 0 deletions
16
examples/functions.rs
Normal file
16
examples/functions.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use comrade::rally;
|
||||
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
let items = vec![1, 2, 3, 4, 5];
|
||||
|
||||
let (input, output) = rally(items, |item: &_| {
|
||||
std::thread::sleep(Duration::from_millis(item * 100));
|
||||
return 0;
|
||||
});
|
||||
|
||||
println!("RALLY RESULTS: {input:?} -> {output:?}");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue