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 comment is hidden because it contains spoiler information about the solution
tried it, still have the same error
This comment is hidden because it contains spoiler information about the solution
It's a CodeWars interface bug. Preloaded code only gets defined when you submit, not when you test.
As a workaround, put your tests in the main code window and hit Submit instead of Run Tests.
This comment is hidden because it contains spoiler information about the solution
I agree. If I pass a list into someone else's function, I want at least a warning in the docs if it's going to modify it.
Please recheck this solution. Since xs is a reference to a list outside of the function, it has the side affect of modifying the data structure. That could be a nasty surprise to the user of this function. I believe a better solution is to run the sort on a copy of the list.
mystery function can't be interfaced through tests provided:
ReferenceError: mystery is not defined
The specifications on output are not ready. There should be more explaination on that end, or more thorough test cases created.