diff --git a/doc/Type/Range.pod6 b/doc/Type/Range.pod6 index 43c4a9fe1..ce5030103 100644 --- a/doc/Type/Range.pod6 +++ b/doc/Type/Range.pod6 @@ -43,11 +43,11 @@ Use the L<...|/language/operators#infix_...> sequence operator to produce lists go from larger to smaller values, or to use offsets other than increment-by-1 and other complex cases. -Use C or C<*> (Whatever) to indicate an end point to be open-ended. +Use C<∞> or C<*> (Whatever) to indicate an end point to be open-ended. =for code for 1..* { .say }; # start from 1, continue until stopped -for 1..Inf { .say }; # the same +for 1..∞ { .say }; # the same =head2 Ranges in subscripts @@ -87,8 +87,8 @@ As an example: Of course, an infinite C always contains another C, therefore: - 1..10 ~~ -Inf..Inf; # True - 1..10 ~~ -Inf^..^Inf; # True + 1..10 ~~ -∞..∞; # True + 1..10 ~~ -∞^..^∞; # True Similarly, a C with open boundaries often includes other ranges: @@ -101,8 +101,8 @@ ones: 'a'..'j' ~~ 'b'..'c'; # False 'b'..'c' ~~ 'a'..'j'; # True - 'perl' ~~ -Inf^..^Inf; # True - 'perl' ~~ -Inf..Inf; # True + 'perl' ~~ -∞^..^∞; # True + 'perl' ~~ -∞..∞; # True 'perl' ~~ 1..*; # True @@ -173,7 +173,7 @@ Returns a list consisting of the start and end point. method infinite(Range:D: --> Bool:D) -Returns C if either end point was declared with C or C<*>. +Returns C if either end point was declared with C<∞> or C<*>. say (1..5).infinite; # OUTPUT: «False␤» say (1..*).infinite; # OUTPUT: «True␤» @@ -286,7 +286,7 @@ results. say (1^..5).reverse; # OUTPUT: «(5 4 3 2)␤» say ('a'..'d').reverse; # OUTPUT: «(d c b a)␤» - say (1..Inf).reverse; # OUTPUT: «(Inf Inf Inf ...)␤» + say (1..∞).reverse; # OUTPUT: «(Inf Inf Inf ...)␤» =head2 method Capture