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.
just a noob here wondering how y'all get to writing such marvelous code hehe.
I came up with the same solution.
I agree a filter having side effects is a bad practice. But I don't think it is a problem when side effects are limited to a local variable created exclusively for that filter.
This comment is hidden because it contains spoiler information about the solution
Nope best practice means it has to be production quality. you just said it yourself, "I didn't get it my first go" so it can't possibly be best practice. (very clever tho)
Come on, it's not too bad. 🙂
Concise, performant and easy to understand.
But I agree that calling
filter
usually shouldn't have side effects.