File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,22 @@ C<:expires> parameter how long to wait (in seconds) before "resetting"
620
620
and not considering a value to have been seen, even if it's the same as
621
621
an old value.
622
622
623
+ = head2 method repeated
624
+
625
+ method repeated(Supply:D: :&as, :&with)
626
+
627
+ Creates a supply that only provides repeated values, as defined
628
+ by the optional C < :as > and C < :with > parameters (same as with
629
+ L < C < unique > |/language/independent-routines#routine_unique> ).
630
+
631
+ my $supply = Supply.from-list(<a A B b c b C>).repeated(:as(&lc));
632
+ $supply.tap(&say); # OUTPUT: «AbbC»
633
+
634
+ See L < C < repeated > |/language/independent-routines#routine_repeated>
635
+ for more examples that use its sub form.
636
+
637
+ B < Note > : Available since version 6.e (2020.01 and later).
638
+
623
639
= head2 method squish
624
640
625
641
method squish(Supply:D: :$as, :$with --> Supply:D)
You can’t perform that action at this time.
0 commit comments