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 is a nice solution, there's a particular pattern for the rules. I solved the problem, but the way I solved it is specific to this problem.
You can
fork
your own solution and publish an improved version if you feel like :)Just a note for anyone looking at this solution - it does have memory leaks whenever there are still elements in the list at the end of the function. A proper teardown would free each remaining element of the list, but I forgot to do that here.