diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-02 14:30:06 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-05-02 14:30:06 +0100 |
| commit | cf811afcfc75442faa0e509b065305a13f495637 (patch) | |
| tree | 6665c7a4cd93cf7441f540ce4a30b12b194c5300 | |
| parent | 7964bbf45a5f5ff3037bf8fd98781e72bb03f1c8 (diff) | |
| parent | f5d13d9efa9c42729384366c7f18725a249eaf93 (diff) | |
| download | perlweeklychallenge-club-cf811afcfc75442faa0e509b065305a13f495637.tar.gz perlweeklychallenge-club-cf811afcfc75442faa0e509b065305a13f495637.tar.bz2 perlweeklychallenge-club-cf811afcfc75442faa0e509b065305a13f495637.zip | |
Merge branch 'master' of https://github.com/manwar/perlweeklychallenge-club
| -rwxr-xr-x | challenge-006/simon-proctor/perl6/ch-1.p6 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/challenge-006/simon-proctor/perl6/ch-1.p6 b/challenge-006/simon-proctor/perl6/ch-1.p6 index 00dca1a540..6d3c0f0715 100755 --- a/challenge-006/simon-proctor/perl6/ch-1.p6 +++ b/challenge-006/simon-proctor/perl6/ch-1.p6 @@ -12,7 +12,10 @@ class GrowableRange { method grow() { $!max++; return self } - method gist() { $!min == $!max ?? $!min.Str !! "{$!min}-{$!max}" } + method gist() { $!min == $!max ?? + $!min.Str !! $!max == $!min+1 ?? + "{$!min},{$!max}" + !! "{$!min}-{$!max}" } method Str() { self.gist } } |
