Ad
  • Custom User Avatar

    Im using javascript I provided What the error is Showing me . It's Expeacting the wrong tail to be returNed

  • Custom User Avatar

    All tests are random, so I can't help you, especially since you're not telling me what language you're using. You probably need to change your solution.

  • Default User Avatar

    The example Clojure tests are misleading. They will pass with the most trivial implementation (as long as the functions are defined).

    (deftest example-tests
    (is (head [5 1]) 6)
    (is (tail [1]) [])
    (is (init [1 5 7 9]) [1 5 7])
    (is (last_ [7 2]) 2)
    )

    They should be

    (deftest example-tests-fixed
    (is (= (head [5 1]) 6))
    (is (= (tail [1]) []))
    (is (= (init [1 5 7 9]) [1 5 7]))
    (is (= (last_ [7 2]) 2))
    )

  • Custom User Avatar

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