aboutsummaryrefslogtreecommitdiff
path: root/challenge-009/daniel-mita
diff options
context:
space:
mode:
authorDaniel Mita <mienaikage@gmail.com>2019-05-25 11:35:43 +0100
committerDaniel Mita <mienaikage@gmail.com>2019-05-25 11:35:43 +0100
commit27e7a467e0c901ca0ff578b8f99e9fc093487c24 (patch)
tree8a1d6dc22bee6f53c00d0799136f19e0d8f3a25e /challenge-009/daniel-mita
parentd36b7ffb8f697e29a04ff3525f25c5820eb0d2a2 (diff)
downloadperlweeklychallenge-club-27e7a467e0c901ca0ff578b8f99e9fc093487c24.tar.gz
perlweeklychallenge-club-27e7a467e0c901ca0ff578b8f99e9fc093487c24.tar.bz2
perlweeklychallenge-club-27e7a467e0c901ca0ff578b8f99e9fc093487c24.zip
Add new error message to week 9 challenge #2 for Perl 6
Diffstat (limited to 'challenge-009/daniel-mita')
-rw-r--r--challenge-009/daniel-mita/perl6/ch-2.p68
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-009/daniel-mita/perl6/ch-2.p6 b/challenge-009/daniel-mita/perl6/ch-2.p6
index b4db7d8758..bd17512c7d 100644
--- a/challenge-009/daniel-mita/perl6/ch-2.p6
+++ b/challenge-009/daniel-mita/perl6/ch-2.p6
@@ -35,6 +35,14 @@ multi MAIN (
multi GENERATE-USAGE (
&main,
+ *@ where { .[1,3…*].all !~~ Numeric },
+ |,
+) {
+ "Error:\n Non-numeric score given.\n\n" ~ GENERATE-USAGE(&main);
+}
+
+multi GENERATE-USAGE (
+ &main,
*@ where * !%% 2,
|,
) {