@@ -336,15 +336,15 @@ Defined as:
336
336
337
337
method Array(--> Array:D) is nodal
338
338
339
- Coerce the invocant to L < Array > .
339
+ Coerces the invocant to L < Array > .
340
340
341
341
= head2 method List
342
342
343
343
Defined as:
344
344
345
345
method List(--> List:D) is nodal
346
346
347
- Coerce the invocant to L < List > , using the L < list > method.
347
+ Coerces the invocant to L < List > , using the L < list > method.
348
348
349
349
= head2 serial
350
350
@@ -367,7 +367,7 @@ Defined as:
367
367
proto method Hash(|) is nodal
368
368
multi method Hash( --> Hash:D)
369
369
370
- Coerce the invocant to L < Hash > .
370
+ Coerces the invocant to L < Hash > .
371
371
372
372
= head2 method hash
373
373
@@ -402,23 +402,23 @@ Defined as:
402
402
403
403
method Slip(--> Slip:D) is nodal
404
404
405
- Coerce the invocant to L < Slip > .
405
+ Coerces the invocant to L < Slip > .
406
406
407
407
= head2 method Map
408
408
409
409
Defined as:
410
410
411
411
method Map(--> Map:D) is nodal
412
412
413
- Coerce the invocant to L < Map > .
413
+ Coerces the invocant to L < Map > .
414
414
415
415
= head2 method Bag
416
416
417
417
Defined as:
418
418
419
419
method Bag(--> Bag:D) is nodal
420
420
421
- Coerce the invocant to L < Bag > , whereby L < Positionals|/type/Positional >
421
+ Coerces the invocant to L < Bag > , whereby L < Positionals|/type/Positional >
422
422
are treated as lists of values.
423
423
424
424
= head2 method BagHash
@@ -427,7 +427,7 @@ Defined as:
427
427
428
428
method BagHash(--> BagHash:D) is nodal
429
429
430
- Coerce the invocant to L < BagHash > , whereby L < Positionals|/type/Positional >
430
+ Coerces the invocant to L < BagHash > , whereby L < Positionals|/type/Positional >
431
431
are treated as lists of values.
432
432
433
433
= head2 method Set
@@ -436,7 +436,7 @@ Defined as:
436
436
437
437
method Set(--> Set:D) is nodal
438
438
439
- Coerce the invocant to L < Set > , whereby L < Positionals|/type/Positional >
439
+ Coerces the invocant to L < Set > , whereby L < Positionals|/type/Positional >
440
440
are treated as lists of values.
441
441
442
442
= head2 method SetHash
@@ -445,7 +445,7 @@ Defined as:
445
445
446
446
method SetHash(--> SetHash:D) is nodal
447
447
448
- Coerce the invocant to L < SetHash > , whereby L < Positionals|/type/Positional >
448
+ Coerces the invocant to L < SetHash > , whereby L < Positionals|/type/Positional >
449
449
are treated as lists of values.
450
450
451
451
= head2 method Mix
@@ -454,7 +454,7 @@ Defined as:
454
454
455
455
method Mix(--> Mix:D) is nodal
456
456
457
- Coerce the invocant to L < Mix > , whereby L < Positionals|/type/Positional >
457
+ Coerces the invocant to L < Mix > , whereby L < Positionals|/type/Positional >
458
458
are treated as lists of values.
459
459
460
460
= head2 method MixHash
@@ -463,7 +463,7 @@ Defined as:
463
463
464
464
method MixHash(--> MixHash:D) is nodal
465
465
466
- Coerce the invocant to L < MixHash > , whereby L < Positionals|/type/Positional >
466
+ Coerces the invocant to L < MixHash > , whereby L < Positionals|/type/Positional >
467
467
are treated as lists of values.
468
468
469
469
= head2 method Supply
@@ -472,8 +472,8 @@ Defined as:
472
472
473
473
method Supply(--> Supply:D) is nodal
474
474
475
- Coerce the invocant first to a C < list > by applying the invocant's
476
- L « C < .list > |/routine/list» method, and then to a L < Supply > .
475
+ Coerces the invocant first to a C < list > by applying its
476
+ L « C < .list > |/routine/list» method, and then to L < Supply > .
477
477
478
478
= head2 method min
479
479
@@ -482,7 +482,7 @@ Defined as:
482
482
multi method min(--> Any:D)
483
483
multi method min(&filter --> Any:D)
484
484
485
- Coerces to L < Iterable > and returns the numerically smallest element.
485
+ Coerces the invocant to L < Iterable > and returns the numerically smallest element.
486
486
487
487
If a L < Callable > positional argument is provided, each value is passed
488
488
into the filter, and its return value is compared instead of the
@@ -498,7 +498,7 @@ Defined as:
498
498
multi method max(--> Any:D)
499
499
multi method max(&filter --> Any:D)
500
500
501
- Coerces to L < Iterable > and returns the numerically largest element.
501
+ Coerces the invocant to L < Iterable > and returns the numerically largest element.
502
502
503
503
If a L < Callable > positional argument is provided, each value is passed
504
504
into the filter, and its return value is compared instead of the
@@ -567,23 +567,21 @@ Defined as:
567
567
568
568
method flatmap(Any:U: &code --> Seq)
569
569
570
- Coerces the L < Any > to a C < list > by applying the
570
+ Coerces the invocant to a C < list > by applying its
571
571
L « C < .list > |/routine/list» method and uses
572
572
L « C < List.flatmap > |/type/List#method_flatmap» on it.
573
573
574
574
say Any.flatmap({.reverse}); # OUTPUT: «((Any))»
575
575
576
- In the case of L < Any > , C < Any.list > returns a 1-item list, as is shown.
577
-
578
576
= head2 method roll
579
577
580
578
Defined as:
581
579
582
580
multi method roll(--> Any)
583
581
multi method roll($n --> Seq)
584
582
585
- Coerces the invocant L < Any > to a C < list > by applying
586
- the L « C < .list > |/routine/list» method and uses
583
+ Coerces the invocant to a C < list > by applying
584
+ its L « C < .list > |/routine/list» method and uses
587
585
L « C < List.roll > |/type/List#routine_roll» on it.
588
586
589
587
say Any.roll; # OUTPUT: «(Any)»
@@ -596,8 +594,8 @@ Defined as:
596
594
multi method pick(--> Any)
597
595
multi method pick($n --> Seq)
598
596
599
- Coerces the L < Any > to a C < list > by applying the
600
- L « C < .list > |/routine/list» method and uses
597
+ Coerces the invocant to a C < list > by applying
598
+ its L « C < .list > |/routine/list» method and uses
601
599
L « C < List.pick > |/type/List#routine_pick» on it.
602
600
603
601
say Any.pick; # OUTPUT: «(Any)»
@@ -661,7 +659,8 @@ Defined as:
661
659
662
660
method first(Mu $matcher?, :$k, :$kv, :$p, :$end)
663
661
664
- Treats the C < Any > as a 1-item list and uses
662
+ Coerces the invocant to a C < list > by applying
663
+ its L « C < .list > |/routine/list» method and uses
665
664
L « C < List.first > |/type/List#routine_first» on it.
666
665
667
666
say Any.first; # OUTPUT: «(Any)»
@@ -672,7 +671,8 @@ Defined as:
672
671
673
672
method unique(:&as, :&with --> Seq:D)
674
673
675
- Treats the C < Any > as a 1-item list and uses
674
+ Coerces the invocant to a C < list > by applying
675
+ its L « C < .list > |/routine/list» method and uses
676
676
L « C < List.unique > |/type/List#routine_unique» on it.
677
677
678
678
say Any.unique; # OUTPUT: «((Any))»
@@ -683,7 +683,8 @@ Defined as:
683
683
684
684
method repeated(:&as, :&with --> Seq)
685
685
686
- Treats the C < Any > as a 1-item list and uses
686
+ Coerces the invocant to a C < list > by applying
687
+ its L « C < .list > |/routine/list» method and uses
687
688
L « C < List.repeated > |/type/List#routine_repeated» on it.
688
689
689
690
say Any.repeated; # OUTPUT: «()»
@@ -694,7 +695,8 @@ Defined as:
694
695
695
696
method squish(:&as, :&with --> Seq)
696
697
697
- Treats the C < Any > as a 1-item list and uses
698
+ Coerces the invocant to a C < list > by applying
699
+ its L « C < .list > |/routine/list» method and uses
698
700
L « C < List.squish > |/type/List#routine_squish» on it.
699
701
700
702
say Any.squish; # OUTPUT: «((Any))»
@@ -706,7 +708,8 @@ Defined as:
706
708
707
709
method permutations(--> Seq)
708
710
709
- Treats the C < Any > as a 1-item list and uses
711
+ Coerces the invocant to a C < list > by applying
712
+ its L « C < .list > |/routine/list» method and uses
710
713
L « C < List.permutations > |/type/List#routine_permutations» on it.
711
714
712
715
say Any.permutations; # OUTPUT: «(((Any)))»
@@ -717,7 +720,8 @@ Defined as:
717
720
718
721
method categorize(&mapper --> Hash:D)
719
722
720
- Treats the C < Any > as a 1-item list and uses
723
+ Coerces the invocant to a C < list > by applying
724
+ its L « C < .list > |/routine/list» method and uses
721
725
L « C < List.categorize > |/type/List#routine_categorize» on it.
722
726
723
727
say Any.categorize({ $_ }); # OUTPUT: «{(Any) => [(Any)]}»
@@ -728,7 +732,8 @@ Defined as:
728
732
729
733
method classify(&mapper -->Hash:D)
730
734
731
- Treats the C < Any > as a 1-item list and uses
735
+ Coerces the invocant to a C < list > by applying
736
+ its L « C < .list > |/routine/list» method and uses
732
737
L « C < List.classify > |/type/List#routine_classify» on it.
733
738
734
739
say Any.classify({ $_ }); # OUTPUT: «{(Any) => [(Any)]}»
@@ -743,9 +748,9 @@ Defined as:
743
748
multi method pairs(Any:U: -->List)
744
749
multi method pairs(Any:D: -->List)
745
750
746
- Returns an empty L < List > if the invocant is undefined, otherwise
747
- converts the invocant to a L < List > via the C < list > method
748
- and calls L < List.pairs|/type/List#routine_pairs > on it:
751
+ Converts the invocant to a L < List > via the C < list > method and returns the result of L < List.pairs|/type/List#routine_pairs > on it.
752
+ Returns an empty L < List > if the invocant is undefined:
753
+
749
754
750
755
say Any.pairs; # OUTPUT: «()»
751
756
my $a;
@@ -761,9 +766,9 @@ Defined as:
761
766
multi method antipairs(Any:U: -->List)
762
767
multi method antipairs(Any:D: -->List)
763
768
764
- Applies the method L < List.antipairs|/type/List#routine_antipairs > to the invocant, if it is defined,
765
- after having invoked C < list > on it. If the invocant is not defined,
766
- it returns an empty L < List > :
769
+ Converts the invocant to a L < List > via the C < list > method and returns the result of
770
+ L < List.antipairs|/type/List#routine_antipairs > on it.
771
+ Returns an empty L < List > if the invocant is undefined :
767
772
768
773
my $a;
769
774
say $a.antipairs; # OUTPUT: «()»
@@ -778,9 +783,9 @@ Defined as:
778
783
multi method kv(Any:U: -->List)
779
784
multi method kv(Any:D: -->List)
780
785
781
- Returns an empty L < List > if the invocant is not defined, otherwise it
782
- does invoke C < list > on the invocant and then returns the result
783
- of L < List.kv|/type/List#routine_kv > on the latter :
786
+ Invokes C < list > on the invocant and returns the result of
787
+ L < List.kv|/type/List#routine_kv > on it.
788
+ Returns an empty L < List > if the invocant is undefined :
784
789
785
790
my $a;
786
791
say $a.kv; # OUTPUT: «()»
@@ -933,7 +938,8 @@ Defined as:
933
938
934
939
method combinations(--> Seq)
935
940
936
- Treats the C < Any > as a 1-item list and uses
941
+ Coerces the invocant to a C < list > by applying
942
+ its L « C < .list > |/routine/list» method and uses
937
943
L « C < List.combinations > |/type/List#routine_combinations» on it.
938
944
939
945
say Any.combinations; # OUTPUT: «(() ((Any)))»
@@ -944,7 +950,7 @@ Defined as:
944
950
945
951
method iterator(--> Iterator)
946
952
947
- Coerces the C < Any > to a C < list > by applying the C < .list > method and uses
953
+ Coerces the invocant to a C < list > by applying its L « C < .list > |/routine/list » method and uses
948
954
L « C < iterator > |/type/Iterable#method_iterator» on it.
949
955
950
956
my $it = Any.iterator;
@@ -957,7 +963,8 @@ Defined as:
957
963
958
964
method grep(Mu $matcher, :$k, :$kv, :$p, :$v --> Seq)
959
965
960
- Coerces the C < Any > to a C < list > by applying the C < .list > method and uses
966
+ Coerces the invocant to a C < list > by applying
967
+ its L « C < .list > |/routine/list» method and uses
961
968
L « C < List.grep > |/type/List#routine_grep» on it.
962
969
963
970
Based on C < $matcher > value can be either C < ((Any)) > or empty List.
@@ -1026,7 +1033,8 @@ Defined as:
1026
1033
multi method batch(Int:D $batch --> Seq)
1027
1034
multi method batch(Int:D :$elems --> Seq)
1028
1035
1029
- Coerces the object to a C < List > by applying the C < .list > method and uses
1036
+ Coerces the invocant to a C < list > by applying
1037
+ its L « C < .list > |/routine/list» method and uses
1030
1038
L « C < List.batch > |/type/List#method_batch» on it.
1031
1039
1032
1040
= end pod
0 commit comments