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 didn't think of optimising, it's just the first solution I found, and didn't think of asking myself how I could do it differently. If I were to attempt to remove explicit recursion, I think I would use
iterate
andtake
to generate the intermediate list.Oh, right, thanks a lot.
This comment is hidden because it contains spoiler information about the solution