Hi Ralph, Both prefix/postfix 'when' look okay on my Rakudo_2020.10 install:

user@mbook:~$ raku
Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2020.10.
Implementing the 𝐑𝐚𝐤𝐮™ programming language v6.d.
Built on MoarVM version 2020.10.

To exit type 'exit' or '^D'
> when 3 { say 'prefix when' }
False
> { say 'postfix when' } when 3
()
> $_ := any(4,3);
any(4, 3)
> when 3 { say 'prefix when' }
prefix when
> { say 'postfix when' } when 3
postfix when

> $_ := any(5,4);
any(5, 4)
> when 5 { say 'prefix when' }
prefix when
> { say 'postfix when' } when 5
postfix when

> $*VM
moar (2020.10)
>



HTH, Bill.



On Tue, Jun 1, 2021 at 8:09 AM Ralph Mellor <ralphdjmel...@gmail.com> wrote:
>
> Curiously, it works for postfix `when`:
> ```
> $_ := any(4,3);
> {say 'postfix when'} when 3; # 3
> when 3 { say 'prefix when' }  # (no output)
> ```
>
> --
> love, raiph

Reply via email to