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.
You are right that the tests aren't fully exhaustive. I specifically tried to ensure that that kind of literal edge cases wouldn't come up because it would be too hard to specify exactly what should happen in the instructions, especially given floating point precision issues.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thank you for catching that, I have updated the test case.
Fixed. Thanks!
Yeah! This a side effect. Clearly this is not valid in functional programming because it breaks immutability. But I do not see a way to easily fix it. I would not worry about this.
This is not possible. The
invoke()
method should return a generator object with only the next() method like in generators(i).