Ad
  • Default User Avatar

    bc it has type [a] -> [[a]] -> a

  • Custom User Avatar

    True. I had wasted a lot of time thinking what went wrong until I saw your comment. By convention, the minus sign is never placed in the denominator in a reduced fraction. I think this should be an issue rather than a suggestion.

  • Custom User Avatar

    Still no random tests. Throwing errors is not idiomatic Haskell - I don't understand why you removed the Maybe.

  • Default User Avatar

    Data.Char has a function called toLower that will take any char and make it lowercase if it's uppercase, and do nothing if it's not. It is more efficient than this implementation.

  • Default User Avatar

    You should make them keep the negative number of a negative fraction in the numerator. I did that and got confused when it wouldn't work on my attempts. I did the solution in haskell, and in that version of the problem there was no mention on where the negative sign should be placed or if it should be placed in a specific location at all.