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.
Nice, I didn't know about the
cycle
method.So cool.
This comment is hidden because it contains spoiler information about the solution
That's why I upvoted it as clever.
What about this solution is incorrect, though?
And this is why I love Ruby.
Oh, for sure! I actually think your solution is pretty great (although I'm still not 100% sure I know exactly how it works, haha). I just couldn't pass up the chance to make a lame joke as it related to the problem description.
Love me a clever one liner. Although if I had to deal with this in a codebase somewhere I think I would be the one throwing up ;)