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.
Works like a charm.
Thanks for the reply. I'll give it another shot.
Is the test for this kata broken? It seems to not see the Cons constructor in its scope.
Here's the message I get when trying to submit the original, pre-populated code:
[Function: Cons] // I console.logged this to make sure Cons is defined
Kata Test Suite
should transform an array into a list and back again
TypeError: Cannot call method 'toArray' of undefined
at Test.it
at Test.describe
It might make sense to explain that node values could be used to uniquely identify node, since we have to use strings as keys into a set/hash of visited nodes.
You're absolutely right.
That condition does't hold for the second element of [0, 1, 0].
[0, 1, 0] is not monotonic - True is not the right answer here.
Awesome.
Cool idea, but it's off. Try this input: [0, 1, 0]