Nimber arithmetic: Difference between revisions

m
→‎{{header|Raku}}: Minor style twiddles
m (→‎{{header|Raku}}: Refactor to set table size with a parameter)
m (→‎{{header|Raku}}: Minor style twiddles)
Line 706:
my $upto = 26;
 
for '<'>, &infix:<⊕>,
'<'>, &infix:<⊗>
-> $op, &f {
print "\n\n\n $op | ", (^$upto)».fmt('%3s'), "\n", '---+-', '----' x $upto;
 
^$upto .map: -> $r {
Line 715:
print &f($r, $_).fmt('%4s') for ^$upto;
}
put "\n\n";
}
 
put "\n\n";
 
put "21508 ⊕ 42689 = ", 21508 ⊕ 42689;
10,333

edits