Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
std::string vowels = "aeiouy";
std::string consonants = "bcdfghjklmnpqrstvwxyz";
auto vowels_gen = choice_gen(vowels);
auto consonant_gen = choice_gen(consonants);
auto weighted_letters_gen = weighted_one_of_gen(
[](char c) { return c; },
weighted(vowels_gen, 2),
weighted(consonant_gen, 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment