[*] is also a meta prefix op
say [*] 4, 3, 2; # 24
But it also looks exactly the same as the [*] postfix combination of
operators
my @a = 1,2,3;
say @a[*]; # (1 2 3)
There is supposed to be one that looks like [**]
my @b = [1,], [1,2], [1,2,3];
say @b[**]; # (1 1 2 1 2 3)
Really @a[*] is
say postfix:« [ ] »( @a, Whatever )
And @b[**] is
say postfix:« [ ] »( @b, HyperWhatever )
---
say *.WHAT.^name; # Whatever
say **.WHAT.^name; # HyperWhatever
On Mon, Apr 6, 2020 at 7:05 PM yary <[email protected]> wrote:
> Question- what am I missing from the below two replies?
>
> Larry's answer came through my browser with munged Unicode, it looks like
> this
>
> [image: image.png]
> - with the Chinese character for "garlic" after the word "values"
>
> Then Ralph says "[**] will be a wonderful thing when it's implemented" but
> as far as I can tell, [**] is exponentiation (math) as a hyper-op, nothing
> to do with flattening. From https://docs.raku.org/language/operators
>
> say [**] 4, 3, 2; # 4**3**2 = 4**(3**2) = 262144
>
>
>
>