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.
Task clearly states that we need to create a function, yet all of the solutions are classes. Its nonsense.
Kotlin translation
Uhhh.... 4 kyu?
Oh, thank you. I was starting to overload all the other operators. Didn't thought about <<.
The
[unsupported type]
thing is a problem with the C++ testing framework. You can fix the messages by addingoperator <<
to your class:As to why it returns wrong result, I do not know yet.
I pass the first 6 tests (a_single_call_should_compare_equal_to_the_number_passed_in, must_be_able_to_store_curried_functions, must_be_able_to_store_values, must_be_usable_in_a_normal_addition, must_be_usable_in_a_normal_subtraction and should_pass_some_example_tests). In particular, I pass all examples given in the kata-instruction.
However, the last test (should_pass_some_tests_with_random_data) fails with
Expected: equal to 1313
Actual: [unsupported type]
I don't know what needs to be supported in addition. Am I supposed to figure this out on my own?
Yes, it is.
Is it solveable in JavaScript?
This comment is hidden because it contains spoiler information about the solution
Nice for object oriented programming.
Additional random tests have been added.
Mutating the input has been addressed via coppying the randomized array and create a fixed structure from it.
Thank you for your contribution, I've address these issues.
The random tests are not random at all, they just shuffles the same input and run multiple times.
Also, mutating the input breaks all the tests, because there are no fixed tests.
Hi,
the initial solution contains two typos:
..., typed; ...
->..., type: ...
I'm getting this with the full test suite:
Oooh, that's funny.
Quite cheeky.
I've adjusted the tests to account of manipulation of the original array.
Loading more items...