Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53e7246

Browse files
committed
rfc0016: replace some leftover "kv"
1 parent 4c7a8f9 commit 53e7246

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rfc0016.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for my ($i, $value) ($alpha->{beta}->[0]->%[ keys $alpha->{beta}->[0]->@* ]) {
4141

4242
This is pretty bad.
4343

44-
With `kv`, we write this:
44+
With `indexed`, we write this:
4545

4646
```perl
4747
for my ($i, $value) (indexed $alpha->{beta}->[0]->@*) {
@@ -66,7 +66,7 @@ just like `keys` or `values`. This is useless, and issues a warning in the new
6666

6767
In void context, the `Useless use of %s in void context` warning is issued.
6868

69-
In list context, `kv LIST` evalutes to a list twice the size of the array,
69+
In list context, `indexed LIST` evalutes to a list twice the size of the array,
7070
meshing the values with a list of integers starting from zero. All values are
7171
copies, unlike `values ARRAY`. (If your LIST was actually an array, you can
7272
use the index to modify the array that way!)
@@ -88,9 +88,9 @@ Nothing specific predicted.
8888

8989
(See the examples under **Rationale**.)
9090

91-
I expect that docs for `keys` and `values` will be updated to reference `kv` as
92-
well, and we'll add a note about it to the documentation on `for` and possibly
93-
pair slices.
91+
I expect that docs for `keys` and `values` will be updated to reference
92+
`indexed` as well, and we'll add a note about it to the documentation on `for`
93+
and possibly pair slices.
9494

9595
When n-at-a-time foreach is no longer experimental, we should refer to the
9696
combination of `for my (...) (...)` with `indexed` as forming an alternative to

0 commit comments

Comments
 (0)