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.
For the Haskell version, is the idea to use libraries (such as Parsec), or are we supposed to roll overything ourselves?
Mutating values in the list is not really in keeping with the functional spirit of the kata.
When removing nodes or appending lists a new list is created, so the original list is not mutated. However, you want to do the least amount of work, so share data wherever possible. If you look at your append function, you might be able to see that you are doing this there already. Is there a way that you could implement something similar for remove?
Should the object constructors return values?
In my initial submit (python version), I get "4 Passed 0 Failed 0 Errors", but I also get a "TypeError: argument 2 to map() must support iteration". It's not clear what the problem is (my implementation handles the empty string). Has it failed a test case? Is it a bug?
Hey, it's not meant to be a personal attack, I was just responding to the site's prompt (I didn't realise that it would be made public). If you are unfamiliar with Java in general and its new features in particular, then it's kind of difficult to know what the problem is -- is it a syntax error, is it a problem with the site, do I just not understand the concepts at all, etc, etc.
Problems with the test environment (Triangle class not defined, imports the wrong assert method, etc).
Had to create Student class in the test environment. Couldn't simply cut and paste from the instructions because there was no class constructor.
What do you mean by "language agnositic"--imperative/loop-based? I note that the solution with the most votes is the simple call to sum.
This comment is hidden because it contains spoiler information about the solution
In Python, are we expected to avoid using the sum or reduce functions? What kind of a solution are you looking for?
How so? I updated the argument with the transposed matrixs and returned it. TBH, I'm not to sure how Python works in terms of mutating variables as a side-effect of functions.