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.
thats not a helpful response
Wouldnt the result be ambiguous? I think i can write 2 as 1x2! or 2x1!
why would you use ∷ in any case? the description doesnt make it clear why would you pad with ∷
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
how?
I guess you have a point, I was very upset before, but now I'm thinking better, thanks for the friendly conversation.
In my code it had parenthesis on all, I thought it wasnt necessary, I really missed it, thanks for warning. I was very upset that I tried it a couple of times without any success, when I named the variables with what they really means I was able to complete it in a minute.
Dont get me wrong, I undestand that verbose code can lead to mistakes such that one I made, but still, its more human readable, and convey meaning.
Does this kata requires an equation to be solved? I basically have the code that works, but cannot comply to the time constraints, and right now I can't think of a way to better its performance.
Mathematicians should read clean code, no one undestands what a, b, k, dt, S, R, I means, why not write human readable code instead? When I try to read this equations, I feel like reading minified javascript.
This kata is very good though.
Here some translation I did to make the equations human readable code, instead of the horrible machine like minified version, hope that helps someone that got stuck:
susceptible = previousSusceptible - interval * numberOfContacts * previousSusceptible * previousInfected;
infected = previousInfected + interval * numberOfContacts * previousSusceptible * previousInfected - fractionOfRecover * previousInfected;
recovered = previousRecovered + interval * fractionOfRecover * previousInfected;
Man, I'm a very sad functional programmer, I did the exactly same program, exactly same alghoritmn in haskell and in javascript, in haskell it couldn't pass the time constraints of 12000 ms, in js it didnt took 2000ms. I'll come later and do it when I get better at FP. Good kata, though
The SQL version of this kata should contain better instructions, like that the result should contain 17 rows, with numbers from 0 to 16 as a column named "n" and another column named "fact", with the factorial value of "n", also that you are not allowed to use CREATE FUNCTION, intead should use WITH RECURSIVE cte.
Amazing kata, my first 4 kyu with haskell
Thanks for the feedback, I really appreciate, I was kinda salty when I wrote my comment, I didn't mean it really, just was very upset about not being able to complete this kata.
This is unironically the worst kata I've seem so far, there are no instructions whatsoever, the tests give random returns, nice one, you really tried your best to make the worst kata ever.
Loading more items...