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.
The sum method in this case is more concise and works faster than inject.
This comment is hidden because it contains spoiler information about the solution
ok, but don't respects the kata statement:
Validate code with simple regex.
Being new to Elixir, I usually don't notice the difference between older and newer versions of the language.
But for this kata, it looks like the
String.pad_trailing/3
function would be really helpful. That function is available in the latest version of Elixir (1.3.4 at the time of this writing), and it's not available in the version of Elixir that's currently supported by CodeWars (1.2.4 at the time of this writing).It's not really an issue with the kata, since it'll likely be resolved next time the Elixir runner gets updated. I love the idea for this kata.
I think this was the first time my solution was the same as the Best Practice solution, lol.
Thanks to the challenge author for putting these simple challenges together for those of us still getting acclimated to how things work.
I hadn't realized how awesome it is to be able to review other solutions until this challenge. I knew there was a better way than my initial solution, but it's so great to be able to review all of them and see some of the ideal ways of going about things.