Skip to content

Commit b101e5e

Browse files
committed
remove doc for sub cross because ENOSPEC (issue #165 on roast)
1 parent b7cdcfe commit b101e5e

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

doc/Type/List.pod6

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -895,34 +895,6 @@ Combining multiple cycles and C<:partial> also works:
895895
896896
See L<this blog post for more elaboration on rotor|http://perl6.party/post/Perl-6-.rotor-The-King-of-List-Manipulation>.
897897
898-
=head2 routine cross
899-
900-
sub cross(+@e, :&with) returns Seq:D
901-
902-
Computes the cross-product of two or more lists or L<iterables|/type/Iterable>.
903-
This returns a sequence of lists where the first item in each list is an item
904-
from the first iterable, the second is from the second given iterable, etc.
905-
Every item will be paired with every other item in all the other lists.
906-
907-
say cross(<a b c>, <d e f>).map(*.join).join(",")
908-
# ad,ae,af,bd,be,bf,cd,ce,cf
909-
910-
The C<cross> routine has an infix synonym as well, named C<X>.
911-
912-
say (<a b c> X <d e f>).map(*.join).join(",")
913-
# output is the same as the previous example
914-
915-
If the optional C<with> parameter is passed, it is used as a reduction operation
916-
to apply to each of the cross product items.
917-
918-
say cross([1, 2, 3], [4, 5, 6], :with(&infix:<*>)).join(",");
919-
# 4,5,6,8,10,12,12,15,18
920-
921-
The C<X> operator can be combined with another operator as a meta-operator to perform a reduction as well:
922-
923-
say ([1, 2, 3] X* [4, 5, 6]).join(",")
924-
# same output as the previous example
925-
926898
=head2 routine zip
927899
928900
Defined as:

0 commit comments

Comments
 (0)