macro_rules! matrix {
    ( $inner_macro:ident [$($n:tt)+] $ms:tt) => { ... };
    ( $inner_macro:ident $( $n:tt [$($m:tt)*] )* ) => { ... };
}
Expand description

Calls an inner macro by expanding the outer arguments in matrix form.

Example:

matrix!(my_macro, [a b c] [1 2 3]);

Is equivalent to:

my_macro!(a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3);