【发布时间】:2016-12-10 18:34:55
【问题描述】:
我有一个特殊的函数,它需要一个列表,列表的每个成员都必须满足多个要求。如何在 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
【问题讨论】:
标签: parameters signature raku