Oh, you wanna go deep? Why stop at 10 levels?
say gather %hash-with-arrays.values.deepmap: { .take }
No .flat needed, even.
Larry
On Sat, Apr 04, 2020 at 10:59:36PM +0100, Ralph Mellor wrote:
: [**] will be a wonderful thing when it's implemented.
:
: In the meantime, you could maybe use
A microwave is easier:
https://www.google.com/search?q=microwave+garlic+to+remove+skin
[**] will be a wonderful thing when it's implemented.
In the meantime, you could maybe use this as a hack that works to 10
levels deep:
my %hash-with-arrays = a => [1,2], b => [3,4];
sub postfix:<[**]> ($arg)
You can also do a hyper descalarize if you're into that sort of thing:
%hash-with-arrays.values»[].flat
Larry
> On 2 Apr 2020, at 23:49, Konrad Bucheli via perl6-users
> wrote:
> I have a hash with arrays as value. Out of that I wanted to get a flat list
> with all the entries in the value arrays. My first intuitive attempt was to
> use flat, but somehow that only works with an additional map step:
>