This commit is contained in:
JMARyA 2025-03-07 04:33:35 +01:00
commit 5cb4facc48
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 684 additions and 0 deletions

16
examples/functions.rs Normal file
View 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:?}");
}