Ad
  • Custom User Avatar

    nothing crazy here if you are familiar with curyying and composition

  • Custom User Avatar

    As far as I know, this solution doesn't work for input strings where characters aren't unique, e.g. "banana" and "atana". The right solution using intersections is, in my opinion, the Bodigrim's.

  • Custom User Avatar

    I am crazy about this solution.

  • Custom User Avatar

    Thank you for the explanation! Someone should submit an issue ticket to change the description.

  • Custom User Avatar

    It took me some time to understand the instructions as well.

    -For all numbers 1 through n, find all pairs for which the product of those pairs is equal to the sum of all numbers from 1 to n excluding that pair.
    -Place each valid pair configuration in its own array.
    -The returned group should be sorted by the first element of each array, in ascending order.

  • Default User Avatar

    I have the same issue. Please fix it :)

  • Default User Avatar

    I do not understand the kata at all. There is quite strange explanation what to do.

  • Default User Avatar

    [Haskell]

    Is there any test case for haskell? I spent a lot of time solving this kata (and I did it). But I was disapointed when found out that tests are missed.

  • Custom User Avatar

    You've relaxed the type of permutations to Ord a => [a] -> [[a]], either by saying this yourself or removing the line. However, the random tests do not choose a fixed a, they expect your function to be String -> [String]. Just keep the type and you're good.

  • Default User Avatar

    (Haskell)
    I've written the function, tests were ok . Then I push submit and got very strange error :

    tmp/haskell115614-19-19p8kzn/Codewars/Kata/Permutations/Test.hs:18:7:
    No instance for (Show a0) arising from a use of forAll' The type variable a0' is ambiguous
    ....
    a lot of output.