@@ -81,7 +81,7 @@ Appends at the end of the buffer
81
81
= for code :skip-test
82
82
$bú.append( @φ[5..10] );
83
83
say $bú.perl; # OUTPUT: «Buf.new(1,1,2,3,5,8,13,21,34,55,89)»
84
-
84
+
85
85
= head2 method prepend
86
86
87
87
method prepend( $elems )
@@ -91,7 +91,7 @@ Adds elements at the beginning of the buffer
91
91
= for code :skip-test
92
92
$bú.prepend( 0 );
93
93
say $bú.perl; # OUTPUT: «Buf.new(0,1,1,2,3,5,8,13,21,34,55,89)»
94
-
94
+
95
95
= head2 method shift
96
96
97
97
method shift()
@@ -101,7 +101,7 @@ Takes out the first element of the buffer
101
101
= for code :skip-test
102
102
$bú.shift();
103
103
say $bú.perl; # OUTPUT: «Buf.new(1,1,2,3,5,8,13,21,34,55,89)»
104
-
104
+
105
105
= head2 method unshift
106
106
107
107
method unshift()
@@ -111,7 +111,7 @@ Adds elements at the beginning of the buffer
111
111
= for code :skip-test
112
112
$bú.unshift( 0 );
113
113
say $bú.perl; # OUTPUT: «Buf.new(0,1,1,2,3,5,8,13,21,34,55,89)»
114
-
114
+
115
115
= head2 method splice
116
116
117
117
method splice( Buf:D: $start = 0, $elems?, *@replacement --> Buf)
@@ -121,7 +121,7 @@ Substitutes elements of the buffer by other elements
121
121
= for code :skip-test
122
122
$bú.splice: 0, 3, <3 2 1>;
123
123
say $bú.perl; # OUTPUT: «Buf.new(3,2,1,2,3,5,8,13,21,34,55,89)»
124
-
124
+
125
125
= end pod
126
126
127
127
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
0 commit comments