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:
Sorry, that first sentence was imprecise: `a` is a named arg, as compared
to the pair `(e=>2)`, which is a positional arg by virtue of the parens.
On Mon, Jan 11, 2016 at 5:01 PM Philip Hazelden
wrote:
> You're passing `a` as a named arg, and `e` as a positional arg.
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)
On 01/11/2016 06:58 PM, mt1957 wrote:
Thanks for the information I didn't know about this detail.
What about the order of input, when a call is made and a Capture
created the order is preserved
otherwise the arguments would be bound to the wrong values isn't it?
But the example shows
Thanks for the information I didn't know about this detail.
What about the order of input, when a call is made and a Capture created
the order is preserved
otherwise the arguments would be bound to the wrong values isn't it? But
the example shows otherwise.