Front page | perl.perl6.users |
Postings from April 2020
Re: unflattering flat
Thread Previous
|
Thread Next
From:
yary
Date:
April 7, 2020 18:03
Subject:
Re: unflattering flat
Message ID:
CAG2CFAYrLROWTwNomsh4phztXXqaTSDM6wZG4Co9PTCf6oVCjQ@mail.gmail.com
I left out first line in the example REPL
> my %hash-with-arrays = a => [1,2], b => [3,4], c=>5, d=>[6,[7,8]]
{a => [1 2], b => [3 4], c => 5, d => [6 [7 8]]}
> say gather %hash-with-arrays.values.deepmap: { .take }
(6 7 8 1 2 3 4 5)
> say %hash-with-arrays.values>>[].flat
(6 [7 8] 1 2 3 4 5)
Thread Previous
|
Thread Next