Skip to content

Instantly share code, notes, and snippets.

@sheepla
Last active June 27, 2024 11:53
Show Gist options
  • Save sheepla/f92e0956b058c019561e5da5653a89b1 to your computer and use it in GitHub Desktop.
Save sheepla/f92e0956b058c019561e5da5653a89b1 to your computer and use it in GitHub Desktop.
๐ŸฆŒใ—ใ‹ใฎใ“ใฎใ“ใฎใ“ใ“ใ—ใŸใ‚“ใŸใ‚“ in Rust๐Ÿฆ€
use std::iter;
fn main() {
iter::repeat(
iter::once("ใ—ใ‹")
.chain(iter::repeat("ใฎใ“").take(3))
.chain(iter::once("ใ“ใ—"))
.chain(iter::repeat("ใŸใ‚“").take(2))
.chain(iter::once("\n")),
)
.take(3)
.flatten()
.for_each(|item| print!("{}", item));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment