Skip to content

Commit 54ea17e

Browse files
committed
Adds better example for Any.pick using Ranges
Eliminates the class example too; refs #1731
1 parent e2130a2 commit 54ea17e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/Type/Any.pod6

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,8 @@ L«C<List.roll>|/type/List#routine_roll» on it.
610610
say $m.roll; # OUTPUT: «(ß ß þ ß þ)␤»
611611
612612
C<$m>, in this case, is converted into a list and then a (weighted in
613-
this case) dice is rolled on it. See also L<C<List.roll>|/type/List#routine_roll> for more information.
613+
this case) dice is rolled on it. See also
614+
L<C<List.roll>|/type/List#routine_roll> for more information.
614615
615616
=head2 method pick
616617
@@ -623,8 +624,9 @@ Coerces the invocant to a C<list> by applying
623624
its L«C<.list>|/routine/list» method and uses
624625
L«C<List.pick>|/type/List#routine_pick» on it.
625626
626-
say Any.pick; # OUTPUT: «(Any)␤»
627-
say Any.pick(5); # OUTPUT: «((Any))␤»
627+
my Range $rg = 'α'..'ω'
628+
say $rg.pick(3); # OUTPUT: «(β α σ)␤»
629+
628630
629631
=head2 method skip
630632

0 commit comments

Comments
 (0)