Yuval Kogman wrote:
You can perform set operations on them:
[!-2]
Hmm, that would produce a boolean index.
is the subscript for everything but the second to last element.
By using a context enforcer (subscript [] ?, maybe since lists are
lazyy they can just be subscripts when used that way?) you can get a
subscript object, which you can then use in a subscript, and it
flattens out.
The set math is done by special casing junctions, perhaps?
I'm not the junction expert, but it's said that they wrap around
indexing/slicing! So the @array[!-2] would just read @array[none(-2)]?
But how does none() get the base set where the second to last is excluded
from?
my @array;
@array[$subscript];
@array[$other];
@array[$subscript | $other]; # union
That is valid already.
@array[$subscript & $other]; # intersection
This'll do autothreaded, indexed access with the outcome of the
all() junction.
Regards,
--
TSa (Thomas Sandlaß)