ct-for 0.1.1

macro to repeat code multiple times with different substitutions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use ct_for::ct_for;

fn main() {
    ct_for!(a in ["5", 6, vec![5, 6, 7]] do
        println!("{:?}", a);
    );

    println!("Printing every combination of [x, y]");
    ct_for!(a in (x, y) do
        ct_for!(b in (x, y) do
            println!("{}, {}", stringify!(a), stringify!(b));
        );
    );
}