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.
I think the description could be expanded to answer:
Also, I imagine that this will require me to store some global state which I need to clear each time my function is called with null. I agree with @arnedag that it would probably be cleaner if you passed the guess function as the parameter, then returned indications on a bad guess, returned
true
on success, or threw an error if we made too many guesses.Here is an example of what that might look like: