Macro with many parameters to say hello



examples/macros/say-hello-many-times/src/main.rs
macro_rules! say_hello {
    ($( $name: expr ),*) => {
        $(
            println!("Hello {}!", $name);
        )*
    };
}

fn main() {
    println!("----");
    say_hello!();
    println!("----");

    say_hello!("Foo", "Bar", "Jane", "Joe");
    // generates code with 4 print statements

    println!("----");
    say_hello!("Rust", "Perl", "Python");
    // generates code with 3 print statements
    println!("----");
}

----
----
Hello Foo!
Hello Bar!
Hello Jane!
Hello Joe!
----
Hello Rust!
Hello Perl!
Hello Python!
----