Hello,
This seems possible:
> my @x = (1, 2, 3, 4, 8, 16, 32, 64, 128);
[1 2 3 4 8 16 32 64 128]
Then:
> for @x -> $x, $y, $z { $x.say }
1
4
32
And:
> for @x -> $x, Any, Any { $x.say }
1
4
32
...assigning to 'Any' seems to 'just work'. Assigning to 'Ni
Hello,
What is the function of the 'lines' method call (in @Result.lines.kv) in
your for loop?
If you remove it, does it 'just do what you want'?
I ask this because of the following interaction on the REPL:
> my @x = (1, 2, 3, 4, 5, 6, 7, 8);
[1 2 3 4 5 6 7 8]
> @x.kv
(0 1 1 2 2 3 3 4 4 5 5 6
thout the dollar sign. Right now you're calling .print on the
> anonymous variable '$'
>
> -y
>
>
> On Mon, Nov 18, 2019 at 8:38 AM yary wrote:
>
>> looks like a bug to me-file an issue on the rakudo GitHub
>>
>> On Sat, Nov 16, 2019 at 5:29 AM Ray
Hello,
I have a question related to the 'colon syntax' of Raku, which allows
you to call methods without parenthesis like this:
class Foo
{
method print($x, $y)
{
say "bar: {$x}, {$y}"
}
}
my $a = Foo.new;
$a.print: 3, 5; # ...this is what
Hello everyone, and thanks everyone for their comments and code snippets
with full of syntax that I haven't discovered as of yet,
Today I managed to figure out how my provided example code could be
rewritten in Perl 6 almost 'verbatim': see the program below in this
message. I implemented a '~~~'
t; You could get the same structure out of a single regex as well.
>
> $test ~~ m {
> ^
> $ = \s+
> $ = [foo \s+]
> [
> | $ = willnotmatch
> | $ = bar
> ]
> }
>
> I'm not sure if you want to i
t;$P = $/.pos;"
assignments.
Is there a way to retain this match like in Perl 5?
Is there a better way in general?
... perhaps it's time to look into grammars? ;)
Thanks!
Regards,
Raymond Dresens.
piler
perspective?).
Perhaps this shouldn't be and the compiler should also complain in this
list assignment case, or perhaps generate a warning?
I'm not that confident to state that this is a bug ;)
Hence the reason why I kind-of report this,
I hope this is somewhat useful,
Thanks for your time,
Regards,
Raymond Dresens.