in https://docs.perl6.org/type/Int#routine_expmod

it reads:


   routine expmod <https://docs.perl6.org/type/Int#___top>

multi  sub     expmod(Int  $y,Int  $mod)returns  Int:D
multi  method  expmod(Int:D:  Int  $y,Int  $mod)returns  Int:D

Returns the given |Int| raised to the |$y| power within modulus |$mod|.

say  expmod(4,2,5);# 1
say  7.expmod(2,5);# 4


Shouldn't the su form read:

multi  sub     expmod(Int:D $x,Int  $y,Int  $mod)returns  Int:D it needs three 
parameters



--

   .~.     In my life God comes first....
   /V\         but Linux is pretty high after that :-D
  /( )\    Francis (Grizzly) Smit
  ^^-^^    http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P+++ L+++$ E--- W+++
N w--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ DI(+) D-
G e++ h+ y? r% z---
------END GEEK CODE BLOCK------
http://www.geekcode.com/

Reply via email to