I was thinking about a data structure to make concatenation of lists easier, something that contains multiple lists (in a sequence) internally, but can be treated as a single contiguous list. I know such a data structure must exist out there already, and I would like to find articles about its performance, but I don't know what it's called. The closest thing I've found so far is a skip list, but that seems to be more like a binary search tree and isn't just for dumping elements in.
I thought of implementing it something like this - the data structure L starts out containing an empty doubly-linked list of arrays.
[]
Then, when an array or other list-like data structure is added to it, it becomes the first element.
Add [100, -4, 2] to L
Head -> [100, -4, 2] <- Tail
The next array added becomes its second element, and so on.
Add [2, 6, 1] to L
Head -> [100, -4, 2] <-> [2, 6, 1] <- Tail
Add [4, 5] to L
Head -> [100, -4, 2] <-> [2, 6, 1] <-> [4, 5] <- Tail
L will only expose methods to iterate over it one at a time (in order), so it can be treated as a normal list.