lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/05/09/2022-19-docublast/ 18:42
Nemokosch Is there a nicer way to add the same value to several hash keys than to copy it enough times using the xx operator? 21:05
at Does setting the default do what you want? docs.raku.org/type/Hash#method_default 21:17
Nemokosch I don't think so 21:21
I'm thinking of "bulk setting" values because I know they will be the same
and Raku actually allows setting multiple values at once but then the RHS also needs to have multiple values
so I end up with something like
%hash{@keys} = value xx +@keys
at that looks reasonable to me 21:22
> and Raku actually allows setting multiple values at once but then the RHS also needs to have multiple values
TIL
does `%hash{@keys} = value xx *` work? 21:23
Nemokosch hmm
o.O it does 21:25
nice 🙂 Thank you
at no problem! 21:46