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 enjoyed this a lot! I thought the tests were well put together -- I was able start small and gradually implement each new feature, with a nice feedback loop along the way.
Generic types seem to be stripped out of error messages for Java code. I'm guessing it's some HTML escaping thing. For example, if I have a line like this:
which e.g. doesn't compile because
integers
is anint[]
, I get an error that looks like this:Okay ya, turns out I was (inadvertently) returning undefined. That's sort of a misleading error though :s
I get
SyntaxError: Unexpected token u
for any solution I try, including just leaving the provided code as is.Okay, fixed. (I'm more of a python person.)
This comment is hidden because it contains spoiler information about the solution
I'm not sure how to up vote this? There's no up vote button where there usually is (next to "Share this kata:").
Loved it!
I'd love to see more sophisticated compiler-y kata in this style.
It wasn't stated in the description that the order of elements in each partition should be preserved.
Either the test cases should be less strict about this, or the description should mention this.
(I tried a cutesy solution that calls Array.sort using the predicate as a comparator; it had the right elements in each partition and returned the correct index but the elements weren't in the same order.)