diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2019-09-09 01:30:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-09 01:30:20 +0100 |
| commit | 7b11e2c498af99929c5493809692dc5cca4f0c1c (patch) | |
| tree | 50055244c1bbc9c4208919f3fec56095268f4547 /challenge-024 | |
| parent | 17b412707aeb51faf68fba4338849ec60c0dbf03 (diff) | |
| parent | ffc99d05669cd8a6b513366d14b76524fbe1d818 (diff) | |
| download | perlweeklychallenge-club-7b11e2c498af99929c5493809692dc5cca4f0c1c.tar.gz perlweeklychallenge-club-7b11e2c498af99929c5493809692dc5cca4f0c1c.tar.bz2 perlweeklychallenge-club-7b11e2c498af99929c5493809692dc5cca4f0c1c.zip | |
Merge pull request #609 from fjwhittle/master
fjwhittle Challenge 024 solutions
Diffstat (limited to 'challenge-024')
| -rw-r--r-- | challenge-024/fjwhittle/perl6/ch-1.p6 | 0 | ||||
| -rw-r--r-- | challenge-024/fjwhittle/perl6/ch-2.p6 | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/challenge-024/fjwhittle/perl6/ch-1.p6 b/challenge-024/fjwhittle/perl6/ch-1.p6 new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/challenge-024/fjwhittle/perl6/ch-1.p6 diff --git a/challenge-024/fjwhittle/perl6/ch-2.p6 b/challenge-024/fjwhittle/perl6/ch-2.p6 new file mode 100644 index 0000000000..1b0dc9bb6e --- /dev/null +++ b/challenge-024/fjwhittle/perl6/ch-2.p6 @@ -0,0 +1,12 @@ +unit sub MAIN (*@file); + +my %index; + +for @file.map(*.?IO).grep({.?f && .?r}) -> $file { + %index.push: + $file.comb(/\w+/, :match).hyper.map({ .Str.fc => $($file.path => .pos,) }); +} + +while my $word = prompt 'Find? ' { + %index{$word.fc}ยป.say; +} |
