On 10/5/18 2:10 PM, ToddAndMargo via perl6-users wrote:
On 10/2/18 5:31 PM, Tony Ewell wrote:
Hi All,

I have been using "flatten" for a while.  I kinda-sotra know
what it means.

 From the following,

https://docs.perl6.org/routine/[%20]#language_documentation_Operators

       The Array constructor returns an itemized Array that does not
       flatten in list context.

What exactly do they mean by "flatten" and "list context"?

Many thanks,
-T

Whoever just wrote me on "flatten", would they please
resend.  My iMap server is on the fritz again.


It just showed up:

EEEEAEEEE
    A
    A

Hopefully you see emails in a fixed width font and the As are in a vertical 
line.
If not, imagine they were, so there's a T shape.

Imagine the horizontal line of four Es, then 3 As vertically, then four more 
Es, is a list.

In this scenario, the horizontal line is a list of 9 elements.

The vertical line is an array (which is an "itemized" list) that
has not flattened into the outer list .

If it had flattened, you'd have instead ended up with 11 elements:

EEEEAAAEEEE

Make sense?

--
raiph


Thanks raiph!

so

xxxyyyzzz
  a
     b

would show up how?  Or do the letter need
to be the same?

Reply via email to