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
This comment is hidden because it contains spoiler information about the solution
Kata author here: indeed, "real" spy libraries might be more useful with a method like you propose, and that could very well have made for a better kata (albeit slightly more challenging). The requirement that this kata record all arguments in all positions and treat them as comparable was meant to be a minimalistic demonstration of the following concepts:
spyOn
returns new, separate spy functionsIf I were rewriting this kata today, I might have tried to make the library more "realistic" in its API and capabilities. That being said, I suspect that anyone who can solve this kata as intended would also be able to solve for a method like you describe.