Skip to content

Instantly share code, notes, and snippets.

@briandfoy
Last active January 9, 2019 21:12
Show Gist options
  • Save briandfoy/56ac559019af474a874cd24e8d41b893 to your computer and use it in GitHub Desktop.
Save briandfoy/56ac559019af474a874cd24e8d41b893 to your computer and use it in GitHub Desktop.
Another FizzBin without an if
use v5.24;
my $n = $ARGV[0] // 35;
my $count = 0;
while($count <= $n) {
state $a = [ \$count, \'Fizz', \'Bin', \'FizzBin' ];
say $a->[ (810092048>>((2*(++$count-1))%30)) & 0b11 ]->$*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment