Last active
January 9, 2019 21:12
-
-
Save briandfoy/56ac559019af474a874cd24e8d41b893 to your computer and use it in GitHub Desktop.
Another FizzBin without an if
This file contains hidden or 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 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