Ad
  • Custom User Avatar

    Duplicate issue.

  • Custom User Avatar

    Ah ok. Can you show me your code?

  • Custom 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!

  • Custom 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!

  • Custom 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