cf https://www.nntp.perl.org/group/perl.perl6.users/2021/04/msg9883.html
--
love, raiph
On Sun, Jan 2, 2022 at 7:35 AM Marc Chantreux wrote:
>
> hello rakoons,
>
> I got this error message
>
> Too few positionals passed; expected 1 argument but got 0
> in sub xxx at - line 1
>
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 ,$inpu
Maybe first explain why the error:
When you specify a Pair as such as an argument, it is interpreted as a *named*
argument.
$ raku -e 'sub a(|c) { dd c }; a b => 42'
\(:b(42))
So thus you can see why the error is thrown: you passed 0 positional arguments
to the subroutine, and it neve
hello rakoons,
I got this error message
Too few positionals passed; expected 1 argument but got 0
in sub xxx at - line 1
in block at - line 2
Welcome to ๐๐๐ค๐ฎ๐๐จโข v2021.09.
Implementing the ๐๐๐ค๐ฎโข programming language v6.d.
Built on MoarV