diff options
| -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 } } |
