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.
I seem to be unable to publish the one labelled as haskell as it is a fork of the "coffeescript" one, and it complains that the solution code is not unique from parent. I'll try some renaming to see what I can do. Also, the unpublish button does nothing.
I did indeed test it, though there were indeed a few mistakes based on my inexperience with QuickCheck. I've responded further to your comment on the translation directly. No clue why it filed as coffeescript, though! I had some server connection issues while trying to save it the first time, which will not have helped.
Translated into Haskell, if you would like to approve it
How should the state of
(x=3) + (x=2)
look after evaluation?{'x':2}
? Or just left as undefined behaviour as it is in C?This comment is hidden because it contains spoiler information about the solution
Unknown error is normally caused by a website error, rather than an error with your code found by the test suite. Try resubmitting!
This comment is hidden because it contains spoiler information about the solution
I found it kind-of tricky, but only because I had trouble coming up with an intuition for the type of foldExpr. Once I got past that mental barrier, it was quite simple, but so interesting that I definitely think it was worthwhile. Thanks for sharing this functional pearl with us on here!
The only issues I've found are in the description: it should mention that you have to implement rep, and maybe be a little nicer on the description of interp. For such an easy kata, I would mention what the first parameter actually is (the dictionary lookup function)
I definitely didn't need the ViewPatterns extension, but I found out about it a few days ago and wanted to try it out :)