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.
It certainly looks elegant and functional, but I dug deeper into how Sequence works and how effective they are for small sets or sequences. As a result, using the measureTimeMillis function, I found that executing generateSequence with subsequent processing takes from 5 to 13 seconds. While if you use "do{}while(...)" or just "while" it takes 0 seconds. From this we can conclude that although Sequence is very concise and saves us from mutability and temporary variables, we still need to be careful when using them for such tasks.
I think this is clever but definitely not best practice.
This is why I joined... just learned the
generateSequence
function!<3
Love it
This comment is hidden because it contains spoiler information about the solution