Ad
  • Default User Avatar

    I don't know Haskell, so I cannot speak to that translation, but such a test case already exists in all other languages.

  • Custom User Avatar
  • Custom User Avatar

    Also, the Kata Description states that on Tuesdays the person in question is afraid of numbers greater, not equal to, than 95.

    Note to self: I should have added the edge case in the test when I translated the kata.

  • Custom User Avatar

    The test suite should check that the "greater than" statement for 95 on Tuesdays is not mistaken for "greater than or equal to".
    Is there a way to submit such changes for consideration to a Kata without expressing the sentiment on Discourse?

  • Custom User Avatar

    Everything is an expression in Haskell, you do not need to be explicit with what to return as Haskell will evaluate your conditional and return that value if you let it, viz. that the following two code snippets are equivalent

    amIAfraid dayOfTheWeek num | dayOfTheWeek == "Monday" = if num == 12 then True else False
    amIAfraid dayOfTheWeek num | dayOfTheWeek == "Monday" = num == 12
    

    Also, the Kata Description states that on Tuesdays the person in question is afraid of numbers greater, not equal to, than 95.