Thanks for teaching me about this function!
fixed
Already raised as issue
Nice catch! Fixed.
This comment is hidden because it contains spoiler information about the solution
λ: solution "CDLXI" -- must be: 461 661
λ: solution "MMMCMXV" -- should be 3915 4115
λ: solution "MMMCMXXIX" -- should be 3929 4131
λ: solution "MCXLI" -- should be 1141 1161
FYI: Tests are incomplete, sorry. Your code is not OK.
λ: solution "CMVIII" -- must be 908 1108 λ: solution "XIV" -- must be 14 16
Hi! FYI: Your solution function pass fawlty tests, but it's wrong.
λ: solution "MCCXXXIV" -- It must be 1234 1236 λ: solution "MMMCCXLI" -- It must be 3241 3261
HASKELL:
In order to prevent people faking a solution by writing a tricky Num instance, proposed tests must change. This modified specs will do the thing:
spec :: Spec spec = describe "solution" $ do it "testing 'XXI'" $ (solution "XXI") `shouldBe` ( 21 :: Integral a => a ) it "testing 'I'" $ (solution "I") `shouldBe` 1 it "testing 'IV'" $ (solution "IV") `shouldBe` 4 it "testing 'MMVIII'" $ (solution "MMVIII") `shouldBe` 2008 it "testing 'MDCLXVI'" $ (solution "MDCLXVI") `shouldBe` 1666
Current tests are:
spec :: Spec spec = describe "solution" $ do it "testing 'XXI'" $ (solution "XXI") `shouldBe` 21 it "testing 'I'" $ (solution "I") `shouldBe` 1 it "testing 'IV'" $ (solution "IV") `shouldBe` 4 it "testing 'MMVIII'" $ (solution "MMVIII") `shouldBe` 2008 it "testing 'MDCLXVI'" $ (solution "MDCLXVI") `shouldBe` 1666
Loading collection data...
Thanks for teaching me about this function!
fixed
Already raised as issue
Nice catch! Fixed.
This comment is hidden because it contains spoiler information about the solution
λ: solution "CDLXI" -- must be: 461
661
λ: solution "MMMCMXV" -- should be 3915
4115
λ: solution "MMMCMXV" -- should be 3915
4115
λ: solution "MMMCMXXIX" -- should be 3929
4131
λ: solution "MCXLI" -- should be 1141
1161
λ: solution "MCXLI" -- should be 1141
1161
FYI: Tests are incomplete, sorry. Your code is not OK.
This comment is hidden because it contains spoiler information about the solution
Hi! FYI: Your solution function pass fawlty tests, but it's wrong.
HASKELL:
In order to prevent people faking a solution by writing a tricky Num instance, proposed tests must change.
This modified specs will do the thing:
Current tests are:
Loading more items...