mix_monikers/
mix_monikers.rs

1#[doc(hidden)]
2extern crate moniker_rs as moniker;
3
4use moniker::{Animal, Moby};
5
6// Mix `Animal` names with `Moby` adjectives
7fn main() {
8    let names = Animal::get_names().into_iter().take(25);
9    let adjectives = Moby::get_adjectives().into_iter().take(25);
10
11    let result: Vec<String> = names
12        .zip(adjectives)
13        .map(|(name, adjective)| format!("{} {}", adjective, name))
14        .collect();
15
16    println!("{:?}", result);
17}