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.
Fixed
Wanting to have more tags is really no issue!
I benchmarked it and found it to be at least twice as slow as the ternary implemenatation. It looks nice though.
It's a question of what's more idiomatic. See Avdi Grimm's master work: Confident Ruby
what does the ampersand do?
O(n)
relevant: https://xkcd.com/1445/
Agreed :) Just a habit, I guess.
The truth is many things are simple, and knowing that is itself valuable.
But I can agree with pointing a couple steps away from the exact method, to build the habit/skill of searching for the simple answers.
For some reason, I can't add more tags. May be I'm doing something wrong, but the tags I set in the description don't show up eventually for the kata.
See the comments below. I think that we need to use integers for the Ruby version. The description is a bit confusing. Still in the process of figuring that out.
Golfing here, not writing a production calculator in 3-4 lines of code... far from best practice, if you actually used this I would laugh at you...