diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-05-12 11:13:10 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2023-05-12 11:13:10 +0100 |
| commit | 45c49096cef063edd6f76dc2cdf9be6ce967ccd1 (patch) | |
| tree | 9546fa03413fd2c902f71f687ed7af8d97cd1428 | |
| parent | 13bd0b0b0b49af253cfaddab9ebbc66e6d46d0b7 (diff) | |
| parent | 0c0e20987dc5677805c95f8e2471492515be32c3 (diff) | |
| download | perlweeklychallenge-club-45c49096cef063edd6f76dc2cdf9be6ce967ccd1.tar.gz perlweeklychallenge-club-45c49096cef063edd6f76dc2cdf9be6ce967ccd1.tar.bz2 perlweeklychallenge-club-45c49096cef063edd6f76dc2cdf9be6ce967ccd1.zip | |
Merge branch 'branch-216' of https://github.com/deoac/perlweeklychallenge-club into deoac-branch-216
| -rw-r--r-- | challenge-216/shimon-ben-avraham/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-216/shimon-ben-avraham/raku/ch-1.md | 20 | ||||
| -rwxr-xr-x | challenge-216/shimon-ben-avraham/raku/ch-1.raku | 17 | ||||
| -rwxr-xr-x | challenge-216/shimon-ben-avraham/raku/registration-number.raku | 14 |
4 files changed, 52 insertions, 0 deletions
diff --git a/challenge-216/shimon-ben-avraham/blog.txt b/challenge-216/shimon-ben-avraham/blog.txt new file mode 100644 index 0000000000..99601e91c6 --- /dev/null +++ b/challenge-216/shimon-ben-avraham/blog.txt @@ -0,0 +1 @@ +https://github.com/manwar/perlweeklychallenge-club/blob/master/challenge-216/shimon-ben-avraham/raku/ch-1.md diff --git a/challenge-216/shimon-ben-avraham/raku/ch-1.md b/challenge-216/shimon-ben-avraham/raku/ch-1.md index 5130597373..280ffd2275 100644 --- a/challenge-216/shimon-ben-avraham/raku/ch-1.md +++ b/challenge-216/shimon-ben-avraham/raku/ch-1.md @@ -1,6 +1,21 @@ +<<<<<<< HEAD TITLE ===== +======= +```raku +# Perl Weekly Challenge #216, Challenge 1 +# © 2023 Shimon Bollinger. All rights reserved. +# Last modified: Thu 11 May 2023 07:47:20 PM EDT +# Version 0.0.1 +``` + +TITLE +===== + + + +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 Task 1: Registration Number =========================== @@ -129,6 +144,11 @@ Finally, make sure we test every word in the `@words` array... ...and print the results! ```raku +<<<<<<< HEAD say @result.List; } # end of multi MAIN (Str $reg, *@words) +======= + say @result.map({"'$_'"}).join(', ').map({ ($_) } ); +} # end of multi MAIN (Str $reg, *@words) +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 diff --git a/challenge-216/shimon-ben-avraham/raku/ch-1.raku b/challenge-216/shimon-ben-avraham/raku/ch-1.raku index 400c22ce2e..cd351a9a6e 100755 --- a/challenge-216/shimon-ben-avraham/raku/ch-1.raku +++ b/challenge-216/shimon-ben-avraham/raku/ch-1.raku @@ -2,7 +2,11 @@ # Perl Weekly Challenge #216, Challenge 1 # © 2023 Shimon Bollinger. All rights reserved. +<<<<<<< HEAD # Last modified: Thu 11 May 2023 06:24:39 PM EDT +======= +# Last modified: Thu 11 May 2023 07:36:57 PM EDT +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 # Version 0.0.1 # always use the latest version of Raku @@ -18,17 +22,30 @@ multi MAIN (Str $reg, *@words) { @result.push($_) if .lc .comb($reg-letters) +<<<<<<< HEAD !~~ () for @words; say @result.List; +======= + !~~ () + for @words; + + say @result.map({"'$_'"}).join(', ').map({ ($_) } ); +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 } # end of multi MAIN (Str $reg, *@words) #| Run with the option '--test' to test the program multi MAIN (Bool :$test!) { use Test::Output; +<<<<<<< HEAD output-is {samewith('AB1 2CD', <abc abcd abd>)}, "(abcd)\n", 'Example 1 OK'; output-is {samewith('007 JB', <job james bjorg>)}, "(job bjorg)\n", 'Example 2 OK'; output-is {samewith('C7 RA2', <crack road rac>)}, "(crack rac)\n", 'Example 3 OK'; +======= + output-is {samewith('AB1 2CD', <abc abcd abd>)}, "('abcd')\n", 'Example 1 OK'; + output-is {samewith('007 JB', <job james bjorg>)}, "('job', 'bjorg')\n", 'Example 2 OK'; + output-is {samewith('C7 RA2', <crack road rac>)}, "('crack', 'rac')\n", 'Example 3 OK'; +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 } diff --git a/challenge-216/shimon-ben-avraham/raku/registration-number.raku b/challenge-216/shimon-ben-avraham/raku/registration-number.raku index f8e06ded41..9eabb9c007 100755 --- a/challenge-216/shimon-ben-avraham/raku/registration-number.raku +++ b/challenge-216/shimon-ben-avraham/raku/registration-number.raku @@ -2,7 +2,11 @@ # Perl Weekly Challenge #216, Challenge 1 # © 2023 Shimon Bollinger. All rights reserved. +<<<<<<< HEAD # Last modified: Thu 11 May 2023 06:24:53 PM EDT +======= +# Last modified: Thu 11 May 2023 07:46:20 PM EDT +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 # Version 0.0.1 # always use the latest version of Raku @@ -124,15 +128,25 @@ Finally, make sure we test every word in the C<@words> array... ...and print the results! =end pod +<<<<<<< HEAD say @result.List; +======= + say @result.map({"'$_'"}).join(', ').map({ ($_) } ); +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 } # end of multi MAIN (Str $reg, *@words) #| Run with the option '--test' to test the program multi MAIN (Bool :$test!) { use Test::Output; +<<<<<<< HEAD output-is {samewith('AB1 2CD', <abc abcd abd>)}, "(abcd)\n", 'Example 1 OK'; output-is {samewith('007 JB', <job james bjorg>)}, "(job bjorg)\n", 'Example 2 OK'; output-is {samewith('C7 RA2', <crack road rac>)}, "(crack rac)\n", 'Example 3 OK'; +======= + output-is {samewith('AB1 2CD', <abc abcd abd>)}, "('abcd')\n", 'Example 1 OK'; + output-is {samewith('007 JB', <job james bjorg>)}, "('job', 'bjorg')\n", 'Example 2 OK'; + output-is {samewith('C7 RA2', <crack road rac>)}, "('crack', 'rac')\n", 'Example 3 OK'; +>>>>>>> 0c0e20987dc5677805c95f8e2471492515be32c3 } |
