Ad
  • Custom User Avatar

    The error message is reasonable because QuickCheck is telling you all about what it can tell you. The problem is:

    1. You need to guess what it means not because the error message itself is incomprehensible, but because there's no context: The test isn't shown
    2. The reference solution is messed up
  • Default User Avatar

    Yeah, incomprehensible error message:

    Falsifiable (after 3 tests and 2 shrinks): 
    expected: Just 0
     but got: Nothing
    [0]
    Positive {getPositive = 1}
    -1
    
    
  • Custom User Avatar

    Is there any place you can reference that unrolls this lazyness for us? I find it hard to tell that it's using laziness.

  • Custom User Avatar

    So I created a solution that runs a diff function over the entire list and then returns the minimum diff. This resulted in a timeout error, their lists are too long. Then I decided to sort the list first by length similarity and return early when the length's start to become too different. Still no luck. Not sure I understand the "best" code snippets on the leaderboards for haskell, how do you do this without running diff on the entire list?

  • Custom User Avatar

    Haskell's pageIndex function is really screwy