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.
Me too🤣🤣🤣🤣
Now it's your chance :-)
I have removed duplicated message, and I think I have got what you mean by switch equivalent in haskell, so updated the example code, but unsure how to use it in test case combined with
shuffle
? Would it be better then current test?Please make up your mind.
That's what I meant, yes. ( This is why I like JS and Python kata to use double, not single, quotes for strings, and single quotes for the [ rare ] occasions that a character is encoded as a string. )
Take a good look at the failure message. It's duplicating information ( this is easier to see if you temporarily fill in a wrong solution ). Expected value is already reported by the default message, so that should not be in the custom message.
Also, the kata description says "If your language supports it, try using a switch statement." Haskell doesn't have a
switch
statement, but it does have an equivalent. I think the example solution should showcase that, according to the intent of the original kata author.Thank you. The feedback in such a details is something what I desperatly needed. I am in Self taught clan for a reason :-) and never worked with any senior developer either.
Now, I was not 100 % sure whether I have understood you correctly, as I did not know what do you mean by 'Zero' is a syntax error in Haskell., but I have searched and I think I have found it now, and it absolutely make sense.
'Zero'
is a syntax error in Haskell. Messages should absolutely be correct - remember, beginner solvers will see them. Don't skimp on a couple of backslashes; use correct quotes.Details matter!
I think so. Have updated both tests and message is now descriptive enough I think. Is that ok?
I have never used Debug.Trace yet, but good to know it :-)
Added
Needs
Strings
tagI dare say this code never returns
[]
.Please follow the Troubleshooting Guide, including the part on how to ask questions in Discourse.
This comment is hidden because it contains spoiler information about the solution
Fixed
Forked to fix description, approved fork.
That problem set is licensed under CC BY-NC-SA 4.0. It could be used as inspiration ( task concepts themselves are probably fair game ), but reusing any description [ snippets ] or code would probably violate the copyright. ShareAlike means you can't change the terms, and CW publishes under different terms. Also, CW Red makes the NonCommercial part questionable.
Going through it I found exceedingly few tasks that did not immediately made me think "yep, that exists".
Loading more items...