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 comment is hidden because it contains spoiler information about the solution
I seek to fix a big problem I had with the kata's Haskell translation: it expects pageIndex to return
Just 0
when given a negative index and a non-empty list.This revision expects the value
Nothing
instead.I'm troubled by the example. Why do we not consider configurations in which the (1) ball is not in the first box? (e.g. |(2)| |(1)(3)| |(4)|
In the description, it says that the
Condorcet
function should return an object with a.winner()
method, evaluating to whoever won the election. It also says that when there is no winner, "the function should returnnull
." This is ambiguous, and I feel it should be clarified that.winner()
is expected to return null.The question description doesn't say this, but the inner radius is half the outer radius.