my @a=<A G C T>;
my $x=@a;
for 1 ... * -> $a { (( [X~] $x xx $a )).join(',').say;last if $a==4; };
sub digits( $_1, $_2 ) {
return $_1, $_2, { ($^a ~ $^b) % 9 } ... *;
}
for 1..5 X 1..5 -> @_ {
say digits( | @_ )[^10];
}
for 10 ... 0 {
.say;
}
sub fib {
my @fib = 1, 1, *+*, ... *;
say @fib[^20];
}
sub MAIN($name) {
say "hello" ~ $name;
fib();
}
loop {
say 'SPAM';
}
print "SPAM\n" xx *;
print "SPAM\n", ~* ... *;
map {say "SPAM"}, ^Inf;
.say for (-270, -255 ... 0, 2 , 4 ... 10).rotor( 2 => -1);
my @doors = False xx 101;
($_ = !$_ for @doors[0, * + $_ ...^ * > 100]) for 1..100;
say "Door $_ is ", <closed open>[ @doors[$_] ] for 1..100;
)
say "Door $_ is open" for map {$^n ** 2}, 1..10;
say "Door $_ is open" for 1..10 X** 2;
say "Door $_ is ", <closed open>[.sqrt == .sqrt.floor] for 1..100;