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've forked the Kata here to add random tests, add a fixed test that tests
signum
, and some other improvements.I've forked the Kata [here] to add random tests among other improvements.
I'm having the same trouble as the user below me. My solution is correct and I'm not using any Lens imports but I'm getting the following error:
uncaught exception: IOException of type UserError
user error (Could not parse solution correctly)
It would be nice if the declaration of
interp
was changed tointerp :: (Name -> Maybe String) -> Phalanx -> Maybe String
as the current one suggests that it receives a function(Name -> Maybe String)
and returns another function(Phalanx -> Maybe String)
.Needs random tests
Lacks random tests
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The
Greatest
kata I have solved!Until this moment I can't believe these things in programming (types, classes, and so on) have so much to do with mathematics.
Could someone tell me where (or how) to learn more about this?
This comment is hidden because it contains spoiler information about the solution
I like this kata. But I've got problem with the fact that the naive Haskell implementation of "pretty" (using ++), which has potentially quadratic complexity (and incidentally is also the way that most solutions are implemented) is promoted as best practice solution. In order to spread the word and promote good Haskell programming practices I would:
e.g:
bigRazor = foldl f (Lit 0) [1..10000] where f r i = Add r (Lit i)
-- and the test would for example just check the lenght of the resulting String
Could you make the
Fractional
andNum
instances more clear? As in,1 + 2
becomesAdd (Literal 1) (Literal 2)
rather thanLiteral 3
, as I mistakenly started with?But complaining aside, best kata ever! Thanks, and I hope you can make more like this. May I suggest error messages with the
Either
monad?