Le Sun, Jan 02, 2022 at 12:32:46PM +0100, Elizabeth Mattijsen a écrit : > Maybe first explain why the error
thanks for the explaination. especially > $ raku -e 'sub a(|c) { dd c }; a b => 42' > \(:b(42)) now my sub works the way I wanted: sub got (|c) { for c.hash.kv -> $rule ,$input { ok (my $r = Pugish.subparse: $input , :$rule ) , "match a $rule in: $input"; $r and return $r; } } got pair => 'obey the law'; > Again, it is all about *reading* the error message. > Is there room for improvement? There always is! I wrote this message mostly because the error message didn't help at all here but now i discovered and inspected the Capture, i realize the message was true but just left me clueless. Capture is a good way to understand what happened. > > Too few positionals passed; expected 1 argument but got 0 because c.list got is all ... many thanks for helping. marc