HaloO,

Larry Wall wrote:
It's also possible I'm just nuts, and slice context should be a purely
run-time activity.

Reading your explanation of array slice context I missed an
answer to the question how the shape of an array is split
into the contexts of functions called inside .[]. I guess
the statement @array[foo;bar] breaks down into the following
steps:

   1) get $slice = @array.shape
   2) call &foo with $slice as context
   3) augment $slice with whatever &foo returned
   4) call &bar with the new $slice context
   5) finalize $slice
   6) call @array[$slice]

The case with variables instead of functions is easier since
fetching the variable's content is not interested in context,
right? But then I don't understand why

   $foo = **;
   $bar = 1;
   @b = @array[$foo;$bar];

shouldn't slice @array in all dimensions except the last, such
that @b.shape.elems == @array.shape.elems - 1.


Regards, TSa.
--

The Angel of Geometry and the Devil of Algebra fight for the soul
of any mathematical being.   -- Attributed to Hermann Weyl

Reply via email to