Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This solution is incomplete... it's not catching the case where the first array has a non-array element and the second array does.
For example, this test will not pass:
Test.expect( ![1,1].same_structure_as([2,[2,2]]), "[1,1] not same as [2,[2,2]]")
The test cases are too weak.
[1].same_structure_as([[1]]) returns true but should be false.