Macro repeat

Source
repeat!() { /* proc-macro */ }
Expand description

Repeats code n times

§Simple example

use loop_code::repeat;

repeat!(5 {
    println!("Hello world");
});

§Loop with indexing

use loop_code::repeat;

repeat!(INDEX 5 {
    println!("Index: {}", INDEX);
});

§Change index type

use loop_code::repeat;

repeat!(I i32 5 {
    println!("Index: {}", I - 32);
});