From 1d2bac3c5ce5458eb18820ce214f5fef418df6aa Mon Sep 17 00:00:00 2001 From: Daniel Mita Date: Wed, 20 Nov 2019 13:47:30 +0000 Subject: Trim scripts --- challenge-035/daniel-mita/perl6/ch-1.p6 | 13 ++----------- challenge-035/daniel-mita/perl6/ch-2.p6 | 13 ++----------- 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); -} -- cgit