Ad
  • Custom User Avatar

    That would make it too easy!

  • Custom User Avatar

    A method that returns either an array index or a value (they at least happen to have the same type) depending on a string you pass as an argument? The hardest thing about this kata is forcing yourself to write something so awful.

  • Custom User Avatar

    There's nothing wrong with the solution at all, just with its ranking as best practice.

  • Custom User Avatar

    This is not remotely best practice, yet it currently has the most best practice votes.

  • Custom User Avatar

    It's half-way clever for its brevity, but definitely not best practice due to inefficiency.

  • Custom User Avatar

    Has no one noticed that the haskell kata tests expect the arguments in a different order from what's in the initial code:

    code (and Prelude): dropWhile :: (a -> Bool) -> [a] -> [a]
    tests: dropWhile :: [a] -> (a -> Bool) -> [a]

    (Well, evidently many people have noticed, but no one has fixed it).

  • Custom User Avatar

    Well, that's your job to find out. But as a hint: you should test properly what your method returns.

  • Custom User Avatar

    You may well get the right values in min and max, but your solution is still not correct.

  • Custom User Avatar

    It's not really cheating, it just has a rather basic error. You should test it a bit more.

  • Custom User Avatar

    The haskell testcases also have ""smaller"" and ""larger"", which both behave like "smaller".

  • Custom User Avatar

    Unknown errors are caused by some codewars error, not by your code or the kata. Try submitting again until you get a proper message.

  • Custom User Avatar

    This is an unnecessarily ugly solution now, because most of it was for preserving the order of whitespace - until it became clear that anything other than a single space is considered part of a word...

  • Custom User Avatar

    It's not clear from the description whether space means any whitespace (which would be more logical) or just single spaces. For the final testcases it's just single spaces.

  • Custom User Avatar

    It ought to be flexible enough with the latest edit.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...