Ad
  • Custom User Avatar

    I know, my solution does not have a type declaration since that occupies a lot of words.. it returns something of type Integral since I use the sum function... I tried the toInteger and fromIntegral functions but it overflows

  • Custom User Avatar

    I don't think you read the error properly..

  • Custom User Avatar

    I have an issue with this kata. I was able to come up with a solution but there's something wrong

    test/HaskellGolfSpec.hs:38:33: error:
        • Couldn't match expected type ‘Int’ with actual type ‘Integer’
        • In the second argument of ‘shouldBe’, namely ‘myf n’
          In the expression: f (n :: Int) `shouldBe` myf n
          In the second argument of ‘($)’, namely
            ‘\ n -> f (n :: Int) `shouldBe` myf n’
       |
    38 |         f (n :: Int) `shouldBe` myf n
       |                                 ^^^^^```