Skip to content

Commit f6a037f

Browse files
committed
use v6.e.PREVIEW for rotor examples
1 parent 4aea97f commit f6a037f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/Type/List.rakudoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,12 +1213,13 @@ See L<this blog post for more elaboration on rotor|http://blogs.perl.org/users/z
12131213
Available as of 6.e language version (early implementation exists in Rakudo
12141214
compiler 2022.02+).
12151215

1216-
say rotor(3, 'a'..'h').join('|'); # OUTPUT: «a b c|d e f␤»
1217-
say rotor(3, 'a'..'h', :partial).join('|'); # OUTPUT: «a b c|d e f|g h␤»
1218-
say rotor(2 => 1, 'a'..'h').join('|'); # OUTPUT: «a b|d e|g h␤»
1219-
say rotor(3 => -1, 'a'..'h').join('|'); # OUTPUT: «a b c|c d e|e f g␤»
1220-
say rotor(1 => 1, 3 => -1, 'a'..'h', :partial).join('|');
1221-
# OUTPUT: «a|c d e|e|g h␤»
1216+
=for code :solo :preamble<use v6.e.PREVIEW;>
1217+
say rotor(3, 'a'..'h').join('|'); # OUTPUT: «a b c|d e f␤»
1218+
say rotor(3, 'a'..'h', :partial).join('|'); # OUTPUT: «a b c|d e f|g h␤»
1219+
say rotor(2 => 1, 'a'..'h').join('|'); # OUTPUT: «a b|d e|g h␤»
1220+
say rotor(3 => -1, 'a'..'h').join('|'); # OUTPUT: «a b c|c d e|e f g␤»
1221+
say rotor(1 => 1, 3 => -1, 'a'..'h', :partial).join('|');
1222+
# OUTPUT: «a|c d e|e|g h␤»
12221223

12231224
=head2 method batch
12241225

0 commit comments

Comments
 (0)