Skip to content

Commit 4ca111d

Browse files
author
Jan-Olof Hendig
committed
Added examples to int-bounds and fixed a typo
1 parent f4b6bd9 commit 4ca111d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/Type/Range.pod6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,15 @@ Returns C<True> if both end points are C<Int> values.
132132
133133
=head2 method int-bounds
134134
135-
method bounds(Range:D: --> Positional)
135+
method int-bounds(Range:D: --> Positional)
136136
137137
If the C<Range> is an integer range (as indicated by L<is-int>), then this
138138
method returns a list with the first and last value it will iterate over
139139
(taking into account L<excludes-min> and L<excludes-max>). Returns a
140140
Failure if it is not an integer range.
141141
142+
say (2..5).int-bounds; # OUTPUT: «(2 5)␤»
143+
say (2..^5).int-bounds; # OUTPUT: «(2 4)␤»
142144
143145
=head2 method minmax
144146

0 commit comments

Comments
 (0)