Skip to content

Commit

Permalink
Changing Inf to ∞ in code samples
Browse files Browse the repository at this point in the history
Refs #1520. I chose this one because it's got a log of Inf. Not
changed in text or when it actually returns Inf.
  • Loading branch information
JJ committed Feb 9, 2018
1 parent 07b74c8 commit db2b417
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doc/Type/Range.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -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<Inf> 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
Expand Down Expand Up @@ -87,8 +87,8 @@ As an example:
Of course, an infinite C<Range> always contains another C<Range>, therefore:
1..10 ~~ -Inf..Inf; # True
1..10 ~~ -Inf^..^Inf; # True
1..10 ~~ -∞..∞; # True
1..10 ~~ -^..^; # True
Similarly, a C<Range> with open boundaries often includes other ranges:
Expand All @@ -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
Expand Down Expand Up @@ -173,7 +173,7 @@ Returns a list consisting of the start and end point.
method infinite(Range:D: --> Bool:D)
Returns C<True> if either end point was declared with C<Inf> or C<*>.
Returns C<True> if either end point was declared with C<> or C<*>.
say (1..5).infinite; # OUTPUT: «False␤»
say (1..*).infinite; # OUTPUT: «True␤»
Expand Down Expand Up @@ -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 ...)␤»

This comment has been minimized.

Copy link
@AlexDaniel

AlexDaniel Mar 26, 2018

Member

misaligned comment?

This comment has been minimized.

Copy link
@JJ

JJ Mar 26, 2018

Author Contributor

Yep...

=head2 method Capture
Expand Down

0 comments on commit db2b417

Please sign in to comment.