Last active
August 1, 2022 14:53
-
-
Save siketyan/862807844684a09ed8562423bcb045d4 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
use itertools::FoldWhile::{Continue, Done}; | |
use itertools::Itertools; | |
use rand::seq::SliceRandom; | |
fn main() { | |
println!( | |
"{}", | |
std::iter::repeat(()) | |
.filter_map(|_| ["ドド", "スコ"].choose(&mut rand::thread_rng())) | |
.fold_while(String::new(), |mut acc, &v| { | |
acc.push_str(v); | |
match acc.ends_with("ドドスコスコスコドドスコスコスコドドスコスコスコ") | |
{ | |
true => Done(acc), | |
_ => Continue(acc), | |
} | |
}) | |
.into_inner() | |
+ "ラブ注入" | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment