Suppose I have a data structure encoding sequence lengths:

seq1: 0 1 2 ... N
seq2: 0 1 2 3 4 ... M
seq3: 0 1 ... P

I would like to write opIndex and opDollar to support the notation obj[seq, x .. $] to retrieve sequences.

However, given that opDollar is templated on dimension (always 1 in this example) and has no information calling function's context/dimension 0 parameter, this seems impossible.

Am I missing an easy solution?

Kind regards

Reply via email to