У меня есть специальная функция, которая принимает список, каждый член списка должен удовлетворять нескольким требованиям. Как мне настроить это в функции 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