HaloO,

Daniel Ruoso wrote:
The number of "summands" might be also unknown. i.e.: map.

when you have

  my @a <== map { ... } <== something()

you can't really know how many elements you have in the first
dimension...

Hmm, I thought that all lists know their length, and if not
they advertise Inf. This length information would flow out
of something() through map before it executes and into @a.
That is, the length is part of the lazy list before it is
iterated.


In any case the flat view @a has to step at most the first iterator in
the array

I'm not sure I see what you mean, but I presume you mean "the first
iteration".

I meant the first infinite iteration. That is, flattened lists can't
see past infinities.


Since one could also go with a shaped @a I think the choice of @@a
versus @a is a bit like the choice between a @a and an anonymous array
in a $ var ala $a = [] which can be handled through $a almost like @a.

I'm not sure I understood that, but I think you're saying that slice
context could be seen just as a regular context, as scalar and list
context, which is something that I agree.

I'm not looking at it from the context POV, but from the type based
dispatch POV. The thing I wanted to say is that you can also have
a multi-dimensional array in a variable with a single @ sigil or in
a scalar variable. The type of the content of the variable decides
if a multi-slice succeeds. Correct me if I'm wrong, but isn't context
just type information derived from the syntactic structure of the
source code?


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to