मेरे पास एक विशेष कार्य है जो एक सूची लेता है, सूची के प्रत्येक सदस्य को कई आवश्यकताओं को पूरा करना होगा। मैं इसे एक 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