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.
Can you share what worked? I can't get this test to pass either. I feel like I'm building an empty list improperly, but I have no idea what an empty list should look like, and I can't get "toArray" to work.
Nothing has changed in this Kata since the beginning so I'd be surprised that it starts failing now. I have double-checked the batery of tests and they all pass and they all make use of Cons which is defined in the preload section of the Kata. So, there must be something in your code or something failed in Code Wars. I just tried doing the solution again by training on my own Kata and it all worked fine.
This kata is rather badly worded. It's not checking for monotonic sequences. If that was the case,
[3,2,1]
should returnTrue
as well.It's checking for:
And for that condition,
[0, 1, 0]
is true.Perhaps take it up with the author of the kata?
This is true for
[0, 1, 0]
. My function returnsTrue
. I don't see your problem.