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.
This is a good practice, of course. But, if you hace a large code, maybe this could be dificult to read.
Technically there is no difference. The compiler will change this version to a "return" statement.
So it is just syntactic sugar and personal preference.
I personally like to use the lambda style if my method does not have much logic like in this case. This reduces your code to the important statement without the noise of the brackets, etc.
Is it better to write it like this or to write it with "return" ? I don't understand when we should use which
I think this is the best practice, isn't it? Is there something wrong with this?