Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created April 26, 2017 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/f213c9fe769bea4852b2923892a77fd8 to your computer and use it in GitHub Desktop.
Save deque-blog/f213c9fe769bea4852b2923892a77fd8 to your computer and use it in GitHub Desktop.
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