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.
Interesting! I was not aware of the range syntax with 3 dots, where 1...n exludes the end of the range.
That's bitwise xor assignment equivalent to
x = x ^ 1
what is the assignment operator ^= ?
We need a simple test that a non-array element in the first is not the same as an array in the second.
Test.expect( ![1,1].same_structure_as([2,[2,2]]), "[1,1] not same as [2,[2,2]]")
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.
I've never seen an array being expanded (by push) while iterating through it with each.
This comment is hidden because it contains spoiler information about the solution