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 nice kata. repeat function is a good idea!
The same way I solved the problem, nice practice.
woow
good job!
perfect
If my feedback offended you, I apologize. That was certainly not my intent. All kata are subject to "best practice" evaluation, regardless of kyu level, and "best practice" refers to practices that are appropriate in production code. In any case, my intent was simply to inspire a dialogue with someone worthy of my respect (namely, you) who might have a compelling counter argument.
This kata is clearly an entry level programming kata and not a "write production code" kata, so you're completely missing the point.
Astute of you to perceive the redundancy. One reason to retain the explicit guard clause, though, would be to preserve the continuity between the documented requirements and the code that implements them.
A maintenance developer, then, would not have to infer how the code satisfies the requirements despite the absence of the check.
brilliant @_@