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 dont believe that this code is how you solve it initialy.
How your mind really solved this task:
Initial sequential process was understandable for your mind. As a result, any general programmer can follow it too and understand your code.
However, your refactor phase is not good practise. You basicaly encrypted your solution into oneliner to look more cool.
Your solution is not even
efficiency > readability
. It isunreadable oneliner >> universum
.Please, dont use this approach in production code. Be kind to your collegues :)