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