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.
Thanks for the comment.
I just followed my intuition. I needed some pointer to a candidate of the 'equality-index', a check whether the needed contition is met and a contition to decide when to stop searching.
In the end, I think our solutions are very similar, but I actually like your solution even more.
To me using a
Range
andeach
-loop is more 'rubyesque' than awhile
-loop.