This comment is hidden because it contains spoiler information about the solution
Completed this kata just to say that "It is possible to mutate the input to the function. This is something that you should never do" is a terrible way of saying "do not mutate function input even if your language permits you to do so" (or something like that).
I love how many different solutions are there for this kata.
Nice kata, love it. Wanted to learn how void pointers work in C for a long time, but never had the time needed to come up with some good use case. This Kata did it for me. Thanks!
What? How does this even...
Ok, after looking at what everyone else did, I do feel kinda stupid.
It still amazes me how much more simple and clean code can you start writing, once you trully "get" functional programming
On submit in assertEquals you have swapped "expected" and "actual" values. It says "Expected: %user input%, should be: %something you expect%" but it should be other way around
This guy won, I surrender.
Oh, I thought it was made on purpose, and got angry for not mentioning that in the description. Anyway, nice kata!