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 absolutely right! I think, I written this from instinct :D
Oh, thanks, I didn't take immutability into consideration, and created cyclic references :D
It would be really great, if
Cons
could be defined elsewhere (NOT in the test code). I tried to give it a somewhat cleaner skeleton, likebut I can't do this, since
Cons
is already defined.You take this to the next level m8 :)
This comment is hidden because it contains spoiler information about the solution
The error messages are not really helpful. I didn't read how factorial is calculated, added the if (num <= 1) { return num; } as terminating condition, and got "1" as error message.
In my opinion, the parameter name shouldn't be
rotten
, since there can be healthy fruits too in that array. Just nitpicking here :)I think I got a working implementation. When I run it, the first 3 tests run ok, then I get this message:
Could the message be more specific? Or could we see, what is tested? At this point I have no idea what the test did, and where should I start fixing the implementation.