Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I understand what you said, I started the same way: going ["NORTH", "SOUTH", "EAST", "WEST"] or ['NORTH', 'WEST', 'SOUTH', 'EAST'] you will end up in the same place, and it will make no sense to move, but what this kata asks for is the instructions to complete a path, not a displacement.

  • Default User Avatar

    Sorry, there are nothing broken. Description is about ["NORTH", "SOUTH", "EAST", "WEST"] and your test is for ['NORTH', 'WEST', 'SOUTH', 'EAST'] as far as I can understand your post.

  • Custom User Avatar

    It seems like the tests are broken/not match the description. The description states:
    In ["NORTH", "SOUTH", "EAST", "WEST"], the direction "NORTH" + "SOUTH" is going north and coming back right away. What a waste of time! Better to do nothing. The path becomes ["EAST", "WEST"], now "EAST" and "WEST" annihilate each other, therefore, the final result is [] (nil in Clojure).

    But the test for my solution fails with: [] should equal ['NORTH', 'WEST', 'SOUTH', 'EAST']