for @a { .say }
my $lambda = { .say } @a.map( $lambda );
for @a -> $item { say $item }
if $a.method() -> $result { say $result }
my $lambda = -> $result { say $result }
Raku is a much more consistent language than beginners expect. The above is just one example of this.
Because it is so consistent; once you learn something in one place, you can use that knowledge everywhere in the language.
But first you have to realize that is even a possibility.
It would take a long time to come to that conclusion if you write Raku by copy-pasting code.
That is because very few languages are as strangely consistent as Raku.
Raku is a much more consistent language than beginners expect. The above is just one example of this.
Because it is so consistent; once you learn something in one place, you can use that knowledge everywhere in the language.
But first you have to realize that is even a possibility.
It would take a long time to come to that conclusion if you write Raku by copy-pasting code.
That is because very few languages are as strangely consistent as Raku.