Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
nothing crazy here if you are familiar with curyying and composition
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.
I am crazy about this solution.
Thank you for the explanation! Someone should submit an issue ticket to change the description.
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.
I have the same issue. Please fix it :)
I do not understand the kata at all. There is quite strange explanation what to do.
[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.
You've relaxed the type of
permutations
toOrd a => [a] -> [[a]]
, either by saying this yourself or removing the line. However, the random tests do not choose a fixeda
, they expect your function to beString -> [String]
. Just keep the type and you're good.(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.