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.
I think it would be helpful to change "gallon" to "imperial gallon" everywhere it appears. When I read "gallon", I automatically think of US gallons... The "useful constants" does mention imperial gallons, which is helpful, but only if you read that section (I just lifted the constants off the web).
It's usually preffy awful to have a function that can return multiple types like this, but if the point of the kata is to show how to do it for those circumstances where it's the least awful thing you can do, then it's a good one.
That's a lot like my solution, but I like how you split the logic into separate, small methods with good names.
@Insti Thank you so much!
That's just pretty. It's succinct and readable.
I like the pre-analysis of loop targets. That worked out nice.
This comment is hidden because it contains spoiler information about the solution
Outstanding Kata. Difficult, and very satisfying once I found the solution. Thanks for making it.
This comment is hidden because it contains spoiler information about the solution
The instructions show given_credentials as a global function, and don't show that it needs to be defined in the Frontend module. It bears mentioning, though.
I like how you mapped the characters to methods.
This interpreter stores only integers on the stack... how do you represent NaN as an integer?
This is very tidy. Nicely done!
Thank you for the kind words. Take a look at the answer by @mikgra also... it's very good. The anchors are necessary according to the problem description. Without the anchors, a length of "xyz123" would create a zero-length array rather than raising an error. If the kata's tests pass without the anchors, then I would think there must be missing tests.
I like this. The only way I can think of to improve it would be to rescue to the specific exception that
Integer()
raises.Loading more items...