You're passing `a` as a named arg, and `e` as a positional arg. .list only
returns the positional args, and .elems only counts those. You can use
.hash to get the named args. Alternatively, if you replace `a=>1` with
`(a=>1)` or `'a'=>1`, it should show up in the .list and .elems counts.

See: http://doc.perl6.org/type/Capture

On Mon, Jan 11, 2016 at 3:56 PM mt1957 <mt1...@gmail.com> wrote:

> L.s.
>
> I've seen that the order of input to a Capture is not kept. Is this a bug?
>
> REPL interaction;
>
>  > my Capture $c = \(a=>1,10,{w=>2},[2,3],(e=>2),(b=>3,),Buf.new(^3))
> \(10, {:w(2)}, [2, 3], :e(2), (:b(3),), Buf.new(0, 1, 2), :a(1))
>
>  > for $c.list -> $item { $item.WHAT.say;}
> (Int)
> (Hash)
> (Array)
> (Pair)
> (List)
> (Buf)
>
> Last item is missing, a pair :a(1). $c.elems reports 6 elements. I'm not
> sure but there was a bug report about it I believe.
>
> Greetings
> Marcel Timmerman
>

Reply via email to