fn main() {
    let data = ["一富士", "二鷹", "三なすび"];
    array_walk(&data, add_bracket_and_count);
}

fn array_walk(data: &[&str], output: fn (s: &str)) {
    for value in data {
        output(value);
    }
}

fn add_bracket_and_count(s: &str) {
    println!("[{s}:{}]", s.chars().count());
}
