I was just experimenting a bit and wanted to see if there was a good way to get the size of a multidimensional list. This is what I came up with: Code:
if(!islist(current)) CRASH("Not a valid list")
var/list/dimensions = new()
dimensions += length(current)
current = current
The problem is, this doesn't take into account lists of lists. It only checks the first element of a each nested list which is fine if I know what I am sending it however if it was tried on a list that did not have a consistent size. (lets say a list that contained a bunch of different types of lists). It would ignore that and report the wrong info. Does anyone have a method to verify that a multidimensional list is actually a consistent multidimensional list? It would have to check every element in every nested list.