Ad
  • Custom User Avatar

    Yeah, really great approach!

  • Custom User Avatar

    Nice and concise! You can even leave out the null check which is quite ugly by just stating "this?.second == x - 1". :-)

  • Custom User Avatar

    Nice kata but shouldn't test consider empty array case?
    Or maybe add "non empty" to description?

  • Custom User Avatar

    Wow! Looks like autogenerated code. What a shame!

  • Default User Avatar

    Haskell tests are wrong because they violates promise given in kata specification.
    Spec: you will always receive a valid array containing a random assortment of direction letters ('n', 's', 'e', or 'w' only).

    Test:
    it "should reject infinite lists" $ do
    property $ forAll infiniteList $ \walk ->
    isValidWalk walk ??! "this infinite walk should have been rejected"

    So test generates infinite lists of arbitrary Char instead of direction letters one.
    Please fix either test or specification.