I didn't see it mentioned, but mySeq.high also exists. That is: `let 
lastElement = mySeq[mySeq.high]`. That can be useful sometimes, eg: `for i in 
0..mySeq.high: ...`

That doesn't help in the OrderedTable example though, you still need to know 
the key. I'm a little surprised that there isn't an access by index in the 
OrderedTable. I feel like I remember encountering such a structure in the 
nimble directory, but I'm blanking on it right now. Worst case you could do 
something like: `toSeq(myOTable.values)[^1]`

Reply via email to