Jump to content

Tropical algebra overloading: Difference between revisions

m
→‎{{header|Raku}}: more fully implement ↑ as serial ⊗ (as task suggests)
(→‎{{header|Raku}}: Add a Raku example)
m (→‎{{header|Raku}}: more fully implement ↑ as serial ⊗ (as task suggests))
Line 606:
<lang perl6>sub infix:<⊕> (Real $a, Real $b) is equiv(&[+]) { $a max $b }
sub infix:<⊗> (Real $a, Real $b) is equiv(&[*]) { $a + $b }
sub infix:<↑> (Real $a, Int $b) is equiv(&[**]) { [+] $a xx $b }
 
use Test;
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.