I’d say, it’s possible:
// Both of these arrays can contain non-ascii chars
const LEMMAS: [&str; 2] = ["ab", "γδ"];
const ENDINGS: [&str; 3] = ["1", "2", "3"];
const EXPANDED_MANUAL: [&str; 6] = ["ab1", "ab2", "ab3", "γδ1", "γδ2", "γδ3"];
const EXPANDED: [&str; 6] = expand!(LEMMAS, ENDINGS);
fn main() {
assert_eq!(EXPANDED_MANUAL, EXPANDED);
}
Unicode-compatible capitalization, maybe not as trivial, you’d probably have to copy some case conversion tables from the standard library internals for a constified implementation of it.. unless some crate already has const-compatible versions of it.