diff --git a/src/core/Range.pm b/src/core/Range.pm index 073d206b947..3ff31cd3ba4 100644 --- a/src/core/Range.pm +++ b/src/core/Range.pm @@ -42,6 +42,9 @@ class Range is Iterable { ($.min, $.max) } + multi method from() { $.min; } + multi method to() { $.max; } + # Beautiful implementation which does not work yet in ng # our Str multi method perl() { # [~] @@ -63,6 +66,10 @@ class Range is Iterable { our Str multi method Str() { $.iterator.join(" "); } + + our multi method Num() { + $.iterator.Seq.elems; + } } our multi sub infix:<..>($min, $max) {