Created
April 26, 2017 07:38
-
-
Save deque-blog/f213c9fe769bea4852b2923892a77fd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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