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

    I tried that, but the test says

    TypeError: Cannot call method 'toArray' of null
    at Test.it
    at Test.describe

    If I use Cons(null, null) I get this error:

    TypeError: Cannot call method 'toArray' of undefined
    at Test.it
    at Test.describe

  • Custom User Avatar

    I'm getting a "Test Didn't Pass: Unknown Error" whenever I try to run my tests. Even with blank tests, and not altering the starting code at all. Doesn't seem like that should happen. :/

  • Custom User Avatar

    Any reason you wouldn't want to throw the needed methods into a constant array (like in my solution)? That way, it doesn't create that array every time you call the method ...

  • Custom User Avatar

    I think the initial value is 0 by default, so don't think we need that here?

    Also, I think I would have a return true if coords.empty? so that it doesn't try to do that expensive exponent function in that case ...