Ad
  • Default User Avatar

    Duplicate issue.

  • Default User Avatar

    Ah ok. Can you show me your code?

  • Default User Avatar

    Not sure if you're still interested in the hint, but try to think about what will happen if your function is called with these parameters:
    nextItem([1,2,3,4], 4);
    Good luck!

  • Default User Avatar

    You can add some print-statements to the test yourself, like this:

          next 7 [1..10000] `shouldBe` (Just 8)
          print "passed test1"
    

    That way the terminal will print a test is done when it has succeeded.
    Good luck!

  • Default User Avatar

    Hey man, nice job on this one. Just finished this for Java and noticed a bug you might have missed :). In the test cases, you take an int[] as a List which causes some parsing problems when testing. Also, you didn't make the method static, so the testclass couldn't call it. I think this fixes it:
    public static String match(int[] usefulness, int months) {
    Hope this helps