Skip to content

Commit 0d4390f

Browse files
authored
Merge pull request #978 from zostay/splice-callable-args
Resolves #977: Correct callable args on splice
2 parents d932df6 + 9e1d756 commit 0d4390f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/Type/Array.pod6

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,17 @@ all the elements starting from index C<$start> are deleted.
166166
167167
Each of C<$start> and C<$elems> can be specified as a
168168
L<Whatever|/type/Whatever> or as a L<Callable|/type/Callable> that returns an
169-
C<int>-compatible value. A C<Whatever> C<$start> uses the number of elements
169+
C<int>-compatible value.
170+
171+
A C<Whatever> C<$start> uses the number of elements
170172
of C<@list> (or invocant). A C<Callable> C<$start> is called with one
171173
argument—the number of elements in C<@list>—and its return value is used
172-
as C<$start>. A C<Whatever> C<$elems> deletes from C<$start> to end of
174+
as C<$start>.
175+
176+
A C<Whatever> C<$elems> deletes from C<$start> to end of
173177
C<@list> (same as no C<$elems>). A C<Callable> C<$elements> is called with
174-
two arguments—the number of elements in C<@list> and the value of C<$start>—and its
175-
return value is used the value of C<$elems>.
178+
just one argument—the number of elements in C<@list> minus the value of
179+
C<$start>—and its return value is used the value of C<$elems>.
176180
177181
Example:
178182

0 commit comments

Comments
 (0)