Not possible for lists as you can add TLinks after and before others without ever using "list.addlast" so there is no way of ensuring that it is correct.
Especially, you will better NEVER use list.remove to remove an item unless it is not speed critical. Because the fast way of doing this is storing the TLink of the item (returned when added to the list) and call TLink.remove which is a O(1) call while TList iterates and is therefor an O(n) call.
In TMap it should be possible
Especially, you will better NEVER use list.remove to remove an item unless it is not speed critical. Because the fast way of doing this is storing the TLink of the item (returned when added to the list) and call TLink.remove which is a O(1) call while TList iterates and is therefor an O(n) call.
In TMap it should be possible