Skip to content

Commit 990adfd

Browse files
committed
Revert "Document Range.clone-with-op."
Closes #1798 D#1798 It was never part of the Perl 6 language and its Rakudo implementation has been now removed[^1] [1] rakudo/rakudo@440fceacc2e2b31484aaa5
1 parent d468b66 commit 990adfd

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

doc/Type/Range.pod6

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -309,37 +309,6 @@ L«C<.excludes-max>|/type/Range#method_excludes-max»,
309309
L«C<.infinite>|/type/Range#method_infinite», and
310310
L«C<.is-int>|/type/Range#method_is-int» as named arguments.
311311
312-
313-
=head2 method clone-with-op
314-
315-
Defined as
316-
317-
method clone-with-op(&op, $value --> Range:D)
318-
319-
The method clones the target range applying the specified
320-
operator C<op> with the specified C<value> to the current C<Range>
321-
boundaries.
322-
323-
For instance:
324-
325-
=begin code
326-
my $r = 1..5;
327-
my $r-plus = $r.clone-with-op( &[+], 7 ); # produces 8..12
328-
my $r-minus = $r.clone-with-op( &[-], 7 ); # produces -6..-2
329-
my $r-multiply = $r.clone-with-op( &[*], 2 ); # produces 2..10
330-
=end code
331-
332-
The method applies the specified operator to the C<min> and C<max>
333-
properties of the C<Range>.
334-
335-
It is possible to clone non-numeric ranges, but both the operator and
336-
value must be of the according type:
337-
338-
=begin code
339-
my $r = 'a'..'c';
340-
my $r-cat = $r.clone-with-op( &[~], 'd' ); # produces 'ad'..'cd'
341-
=end code
342-
343312
=end pod
344313

345314
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)