use compose_idents::compose;
compose!(
for (suffix, (interjection, noun)) in [
(BAR, (Hello, "world")),
(baz, ("Hallo", "welt")),
]
my_fn = concat(foo, _, 1, _, lower(suffix)),
greeting = concat(to_str(interjection), ", ", noun, "!"),
{
#[doc = "Greets: % greeting %"]
fn my_fn() -> &'static str { greeting }
},
);
fn main() {
assert_eq!(foo_1_bar(), "Hello, world!");
assert_eq!(foo_1_baz(), "Hallo, welt!");
}