aboutsummaryrefslogtreecommitdiff
path: root/challenge-035
diff options
context:
space:
mode:
authorDaniel Mita <mienaikage@gmail.com>2019-11-20 13:47:30 +0000
committerDaniel Mita <mienaikage@gmail.com>2019-11-20 13:47:30 +0000
commit1d2bac3c5ce5458eb18820ce214f5fef418df6aa (patch)
tree6944c4da14a6a1caf9e81d5bb7cb3f58d2006ca4 /challenge-035
parent89ee2ff068ddefa31f32646f739b5735cc1cb37f (diff)
downloadperlweeklychallenge-club-1d2bac3c5ce5458eb18820ce214f5fef418df6aa.tar.gz
perlweeklychallenge-club-1d2bac3c5ce5458eb18820ce214f5fef418df6aa.tar.bz2
perlweeklychallenge-club-1d2bac3c5ce5458eb18820ce214f5fef418df6aa.zip
Trim scripts
Diffstat (limited to 'challenge-035')
-rwxr-xr-xchallenge-035/daniel-mita/perl6/ch-1.p613
-rwxr-xr-xchallenge-035/daniel-mita/perl6/ch-2.p613
2 files changed, 4 insertions, 22 deletions
diff --git a/challenge-035/daniel-mita/perl6/ch-1.p6 b/challenge-035/daniel-mita/perl6/ch-1.p6
index 9b2a502a05..23d8c1fa7c 100755
--- a/challenge-035/daniel-mita/perl6/ch-1.p6
+++ b/challenge-035/daniel-mita/perl6/ch-1.p6
@@ -3,17 +3,8 @@ use v6.d;
use lib $?FILE.IO.dirname;
use Morse;
-# My intention to take &encode directly from Morse and
-# use it as MAIN here. This does what I intended, but
-# I'm unsure if it was the best way to go about it.
+RUN-MAIN( &encode, Nil );
-sub MAIN (
- |c where * ~~ &encode.signature,
- --> Nil
-) {
+sub MAIN ( |c --> Nil ) {
encode(||c).say;
}
-
-sub GENERATE-USAGE(|) {
- RUN-MAIN(&encode, Nil);
-}
diff --git a/challenge-035/daniel-mita/perl6/ch-2.p6 b/challenge-035/daniel-mita/perl6/ch-2.p6
index 7a72e65f2b..0282d1fad7 100755
--- a/challenge-035/daniel-mita/perl6/ch-2.p6
+++ b/challenge-035/daniel-mita/perl6/ch-2.p6
@@ -3,17 +3,8 @@ use v6.d;
use lib $?FILE.IO.dirname;
use Morse;
-# My intention to take &decode directly from Morse and
-# use it as MAIN here. This does what I intended, but
-# I'm unsure if it was the best way to go about it.
+RUN-MAIN( &decode, Nil );
-sub MAIN (
- |c where * ~~ &decode.signature,
- --> Nil
-) {
+sub MAIN ( |c --> Nil ) {
decode(||c).say;
}
-
-sub GENERATE-USAGE(|) {
- RUN-MAIN(&decode, Nil);
-}