Ad
  • Custom User Avatar

    I'm very confused by one of the tests: pred (successor x) == Just x

    But pred = nat Nothing Just. How can this possibly be true for any x?

  • Custom User Avatar

    Is Listable c => Listable [c] actually true? I have some sort of feeling that this implies that the reals are enumerable.

    Consider http://faculty.washington.edu/keyt/reals.pdf. Briefly this says:

    • An enumeration of the real numbers will give rise immediately to an enumeration of the set of all sets of natural numbers.
    • But the set of all sets of natural numbers is not enumerable.
    • Hence, the set of real numbers is not enumerable.

    The second bullet is important. We show in the kata that the natural numbers are enumerable. So, if we have Listable c => Listable [c], then we violate the second bullet, don't we?

  • Custom User Avatar

    Yeh, same for me. First couple of submits timed out, then eventually came in just under 12s.

  • Custom User Avatar

    Anyone got any advice for optimisation in Haskell? I'm stuck timing out on the slow programs.