RosettaCodeData/Task/Repeat/Rust/repeat-5.rust

14 lines
150 B
Plaintext

trait Bar {
fn run(self);
}
impl Bar for usize {
fn run(self) {
print!("{};", self);
}
}
fn main() {
repeat(Bar::run, 6);
}