Fwd: unflattering flat

2020-05-02 Thread William Michels via perl6-language
Migrating this question over from perl6-users : Can someone explain why in the second and third REPL code lines below, line 2 returns a List while line 3 returns a Seq? And is there a general rule to remember which code returns which data structure? 1> my %hash-with-arrays = a => [1,2], b => [2,

Correct enum incantation?

2021-05-05 Thread William Michels via perl6-language
Hello, I've been reading over an interesting Answer on StackOverflow by wamba: https://stackoverflow.com/a/67324175/7270649 I started trying to explore enums on my own and quickly realized that method calls on enums are different from simple key/value pairs. For enums, calling a `.key` or `.valu

Re: Correct enum incantation?

2021-05-05 Thread William Michels via perl6-language
Thank you Fernando! (still on Rakudo 2020.10 here). On Wed, May 5, 2021 at 10:24 AM Fernando Santagata < nando.santag...@gmail.com> wrote: > On Wed, May 5, 2021 at 6:00 PM William Michels via perl6-users < > perl6-us...@perl.org> wrote: > >> Hello, >> >> I've been reading over an interesting Ans