The draft Synopsis 29 [*] shows that the .keys, .kv, .pairs,
and .values methods are defined for Array but not List.

[*] http://svn.pugscode.org/pugs/docs/Perl6/Spec/Functions.pod

However, t/spec/S29-array/kv.t has entries like:

    # (1,).kv works correctly
    {
        my @a = ();
        @a = try { (1,).kv };
        #?pugs 2 todo 'bug'
        is(@a[0],0, "first element is 0");
        is(@a[1],1, "second element is 1");
    }

Of course, (1,) is a List, not an Array, so the above doesn't
work.  Is S29 wrong or the test?

Personally I think it makes sense for .keys, .kv, .pairs, and
.values to work on List, as shown in the test.  But I'll follow
whatever the spec says should be the case.

Thanks!

Pm

Reply via email to