Is there a way to count with macros?
While the ordinary macro system does not enable you to repeat the macro expansion many times, there is no problem with using a for loop in the macro: macro_rules! many_greetings { ($times:expr) => {{ for _ in 0..$times { println!(“Hello”); } }}; } If you really need to repeat the macro, you have to look … Read more