Is there a simple way to test if two maps are equal? The following command doesn't seem to work how I expected:
I'm dealing with a multidimensional map, and short of checking every dimension recursively I can't really figure out a way of doing this.
EDIT:
Ok, so far the shortest thing I've come up with is
I'd be interested if anyone knows a better way
Code:
> ash int[int] a; int[int] b; b[1]=1; print(a==b);
true
Returned: void
I'm dealing with a multidimensional map, and short of checking every dimension recursively I can't really figure out a way of doing this.

EDIT:
Ok, so far the shortest thing I've come up with is
Code:
boolean isEqual(string[int][int][int] m1, string[int][int][int] m2)
{
foreach a,b,c,d in m1
if (m2[a][b][c] != d)
return false;
foreach a,b,c,d in m2
if (m1[a][b][c] != d)
return false;
return true;
}
I'd be interested if anyone knows a better way

Last edited: