diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm index 4ecb0146dad..d887f6cf658 100644 --- a/src/Perl6/Grammar.pm +++ b/src/Perl6/Grammar.pm @@ -1669,6 +1669,7 @@ token infix:sym<*> { } token infix:sym { } token infix:sym
{ } token infix:sym<%> { } +token infix:sym { } token infix:sym<+&> { } token infix:sym<~&> { } token infix:sym { } diff --git a/src/core/Real.pm b/src/core/Real.pm index 85cdc291037..4f5aaea4fba 100644 --- a/src/core/Real.pm +++ b/src/core/Real.pm @@ -298,3 +298,10 @@ multi sub infix:<**>(Real $a, Real $b) { multi sub infix:<**>(Num $a, Num $b) { pir::pow__NNN($a, $b) } + +# NOTE: mod is only actually defined for integer types! +# But if you have an integer type that does Real, this +# should automatically define an appropriate mod for you. +multi sub infix:(Real $a, Real $b) { + $a - ($a div $b) * $b; +}