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.
Bro I was trying to just remeber the Concat(). I'm trying to use the Linq library at it's maximum.
This should be best practice as the higher-upvoted code is less clean using single-letter variable names.
why the sarcasm?
I'll remember next time. Thanks
Use spoiler flag, your posts in a solution are visible in the homepage otherwise, and you're showing several solutions at once.
This comment is hidden because it contains spoiler information about the solution
I did not know this. By how much it's slower/faster? Let's say you have a list of 10,000, by how much does it differ? Mhm, let's try this out.
what about access to variable in closure is slower then in local (parameter) context ?
Why access the 3rd parameter when it's already available in the function's closure? XD I'm not aware of any especially good reason to prefer one solution over the other. I find it a bit cleaner using just those two parameters, list and dev, over using 4 “isSameLanguage(list), every((one, two, three) =>”.
why accessing list variable from closure when it is available as 3rd parameter in every ?
I like this solution. Tho I wasn't aware of this as I'm just starting out, it's really nice to get a grasp on other/better ways to write code.
Thank you so much for your reply! So there is no reason to reivent the wheel trying to write some code on your own, which have same functionality as this already written and saved as functions in language libraries, right? I gotta trust that if there is built-in function it is most efficient and most safe for all purposes, is that correct?
Hi,
Yes, I think it's a good idea to use functions from a language's "standard library" whenever possible in order to avoid mistakes, performance issues etc. Once you learn them you can also save time and communicate better with other people who are familiar with them.
I believe the code in our solution is more readable, more concise and less error-prone. Notice you can read it almost as an English sentence, compared to low-level "mathematical" language in your solution. It becomes important when you read and maintain a large code base.
In summary, it's a good idea to operate on a high level of abstraction. Think about higher-order functions in functional programming or classes with their public methods in object-oriented programming.
This comment is hidden because it contains spoiler information about the solution