Thomas Sandla▀ wrote:

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?

It does no such thing. It creates a new none() junction over what was stored at index -2. It's when you evaluate the new junction that the none comes into effect.


And once again, I feel the need to remind people that junctions and sets are two different things.

If I get to do what I'd like to to junctions, the above would actually be illegal. But for that I have to wait for Damian to get back. Given that when he left he said "I'll be away for the rest of the week", and that was on Feb 22, one can be left to assume that Damian is suffering from a very long week. Poor Damian. Sadly, my recent weeks have felt as if they were 2 months long. <toast>Here's to a return of the 7 day week!</toast>

-- Rod Adams

Reply via email to