Beta
Join until impossible
Loading description...
Reflection
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Haskell translation
Testing is not everything I would have liked it to be, but it's adequate.
( If anyone knows how to do polymorphic recursion, I have some questions for you .. )
( This might be more appropriate as a separate kata. Discussion is ongoing. )
Ok, this should not be translated into Haskell.
I have a Haskell translation for this. But I would like help with generating testcases with random types. Template Haskell may make this possible, but I don't know Template Haskell.
Can anyone help?
( I have also posted this question on several CodeWars Gitter fora. Feel free to react anywhere. )
I have no idea. It seems randomness is hard in Haskell in general, and I am not familiar with Haskell either :|
Can't blame you. ( Randomness isn't actually that hard, it's just monadic. But the separation between type and term level is severe. )
This comment has been hidden.
Isn't that a valid solution? Updated tests with more
nothing
tests and strongerjust
tests.Ooops, it's now rejected. Somehow I didn't understand why it's invalid, but seems my test updates solves the issue.