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.
you have to rename the test module and make slight adjustmenst to it's export behaviour. I cannot change the Kata, but I have left a comment here on how to do it.
I renamed "Test.IntegerToNestedStructure (main)" to "Test.IntegerToNestedStructureSpec (spec)"
..and instead of "main = hspec $ do" i wrote:
"main = hspec spec"
"spec = do"
FIXING THE BUG FOR HASKELL:
as posted before, the Haskell Version does currently not work. It says "The name of the test module must end with 'Spec'".
to Fix this Issue, you have to rename the Test module and slighly change it's export signature.
I renamed "Test.IntegerToNestedStructure (main)" to "Test.IntegerToNestedStructureSpec (spec)"
..and instead of "main = hspec $ do" i wrote:
"main = hspec spec"
"spec = do"
great Kata! I'm having a good time solving it.
that's called cheating, and that leads to a ban. Don't use it
Why solve the kata, if you can just break the test cases.
this is ingenious! Hats off to you
no irony. i am loving it and would have never thought of it myself!
thanks man! i'm almost done but had the exact same test case fail upon submitting. now i can look into it (using haskell btw)
fib (-2) + fib (-1) == fib 0
andfib 0 == 0
, so they can't be all negative.Some tests seem to be broken.
I stole my code from another side - i mean to say, from people way smarter than me. runs fine for all sample tests and for most of the trial - but then fails only with the random negative number test.
I guess this has to do with this bug, that negative fibonacci numbers are not always expected to come out negative - as they should.
trained with Haskell with Solution from www.nayuki.io
Oh wow, thank you for clarifying! I was really confused as of how i am supposed to sort groups with same length