Skip to content

Instantly share code, notes, and snippets.

@bstrie
Last active October 12, 2015 20:48
Show Gist options
  • Save bstrie/4084816 to your computer and use it in GitHub Desktop.
Save bstrie/4084816 to your computer and use it in GitHub Desktop.
// THIS CODE IS SOOO OBSOLETE. SUITABLE ONLY FOR HISTORICAL CURIOSITY
use int::range;
use option::get_default;
fn main() {
for range(1,101) |i| {
io::println(get_default(
(if i % 3 == 0 { Some(~"Fizz") } else { None } +
if i % 5 == 0 { Some(~"Buzz") } else { None }),
i.to_str()
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment