5
私はリストを取る特別な機能を持っています、リストの各メンバーは複数の要件を満たさなければなりません。これをperl6関数でどのように設定するのですか?perl6:関数のパラメータに複数の要件を指定する方法は?
sub specialFunc(List $x) {};
(1) $x is a list # easy, List $x, but what about the following:
(2) each member of $x is numeric
(3) each member of $x is positive
(4) each member of $x is greater than 7
(5) each member of $x is odd number
(6) each member of $x is either the square or the cube of an even number plus 1;
ありがとうございました!
lisprog
ありがとう、smls !!!私は同意する、(6)は冗長であることを暗示する(5)。ありがとうございました ! – lisprogtor