Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    This kata is rather badly worded. It's not checking for monotonic sequences. If that was the case, [3,2,1] should return True as well.

    It's checking for:

    whether for any x all successors are greater or equal to x

    And for that condition, [0, 1, 0] is true.

    Perhaps take it up with the author of the kata?

  • Custom User Avatar

    Your job is to check whether for any x all successors are greater or equal to x

    This is true for [0, 1, 0]. My function returns True. I don't see your problem.