Skip to content

Commit fbc24bb

Browse files
committed
Fix split examples' output
The routine split returns a Seq
1 parent 90efdf1 commit fbc24bb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/Type/Cool.pod6

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,14 +1183,14 @@ If C<$delimiter> is a string, it is searched for literally and not treated
11831183
as a regex. You can also provide multiple delimiters by specifying them as a
11841184
list; mixing Cool and Regex objects is OK.
11851185
1186-
say split(';', "a;b;c").raku; # OUTPUT: «("a", "b", "c")␤»
1186+
say split(';', "a;b;c").raku; # OUTPUT: «("a", "b", "c").Seq␤»
11871187
say split(';', "a;b;c", 2).raku; # OUTPUT: «("a", "b;c").Seq␤»
11881188
1189-
say split(';', "a;b;c,d").raku; # OUTPUT: «("a", "b", "c,d")␤»
1190-
say split(/\;/, "a;b;c,d").raku; # OUTPUT: «("a", "b", "c,d")␤»
1191-
say split(/<[;,]>/, "a;b;c,d").raku; # OUTPUT: «("a", "b", "c", "d")␤»
1189+
say split(';', "a;b;c,d").raku; # OUTPUT: «("a", "b", "c,d").Seq␤»
1190+
say split(/\;/, "a;b;c,d").raku; # OUTPUT: «("a", "b", "c,d").Seq␤»
1191+
say split(/<[;,]>/, "a;b;c,d").raku; # OUTPUT: «("a", "b", "c", "d").Seq␤»
11921192
1193-
say split(['a', /b+/, 4], '1a2bb345').raku; # OUTPUT: «("1", "2", "3", "5")␤»
1193+
say split(['a', /b+/, 4], '1a2bb345').raku; # OUTPUT: «("1", "2", "3", "5").Seq␤»
11941194
11951195
By default, split omits the matches, and returns a list of only those parts of
11961196
the string that did not match. Specifying one of the C<:k, :v, :kv, :p> adverbs
@@ -1227,8 +1227,8 @@ to C<split>.
12271227
Note that empty chunks are not removed from the result list.
12281228
For that behavior, use the C<:skip-empty> named argument:
12291229
1230-
say ("f,,b,c,d".split: /","/ ).raku; # OUTPUT: «("f", "", "b", "c", "d")␤»
1231-
say ("f,,b,c,d".split: /","/, :skip-empty).raku; # OUTPUT: «("f", "b", "c", "d")␤»
1230+
say ("f,,b,c,d".split: /","/ ).raku; # OUTPUT: «("f", "", "b", "c", "d").Seq␤»
1231+
say ("f,,b,c,d".split: /","/, :skip-empty).raku; # OUTPUT: «("f", "b", "c", "d").Seq␤»
12321232
12331233
=head2 routine lines
12341234

0 commit comments

Comments
 (0)