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.
That makes sense. Thank you for the kata and clarification!
Could someone please explain to me why we have to return true if a function was called with a specific argument instead of set of arguments?
I just don't see how that can be a desirable outcome.
Say, we call adderSpy(1, 2, 3)
and adderSpy.wasCalledWith(2) must return true.
Wouldn't it be much more meaningful only for adderSpy.wasCalledWith(1, 2, 3) to return true in this case?
Amazing explanation for probably the most effective solution!
Sorting given array seems like a wasted effort in this case, especially when you consider that it's not even properly sorted. That would still get the job done, but it's an expensive solution.