Skip to content

Instantly share code, notes, and snippets.

@diakopter
Created May 29, 2012 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diakopter/2830046 to your computer and use it in GitHub Desktop.
Save diakopter/2830046 to your computer and use it in GitHub Desktop.
my @d[4;4];
for 0..3 -> $x {
@d[$x;0] = 1;
my $s = 2 * ($x + 1);
print "\$x=$x, \$s=$s, \@d[\$x;0]=@d[$x;0], \$s + \@d[\$x;0]=" ~
$s + @d[$x;0];
@d[$x;1] = $s + @d[$x;0];
say ", \@d[\$x;1]=@d[$x;1]";
}
print "\n";
for 0..3 -> $x {
for 0..3 -> $y {
say "\$x=$x, \$y=$y, \@d[\$x;\$y]=@d[$x;$y]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment