Skip to content

Commit d6099f6

Browse files
committed
Clarifies combinations, refs #2632
1 parent 1e98c5e commit d6099f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/Type/Any.pod6

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,13 @@ method and uses L«C<List.combinations>|/type/List#routine_combinations» on it.
13271327
=for code
13281328
say (^3).combinations; # OUTPUT: «(() (0) (1) (2) (0 1) (0 2) (1 2) (0 1 2))␤»
13291329
1330+
Combinations on an empty data structure will return a list with a single
1331+
element, an empty list; on a data structure with a single element it will
1332+
return a list with two lists, one of them empty and the other with a single
1333+
element.
1334+
1335+
say set().combinations; # OUTPUT: «(())␤»
1336+
13301337
=head2 method grep
13311338
13321339
Defined as:

0 commit comments

Comments
 (0)