Ad
  • Custom User Avatar

    Maybe, just maybe this is an actual issue ...

  • Custom User Avatar

    There's no need to actually use a sieve to solve this kata. Currently this kata is almost a duplicate of the numerous primes katas... Tests should be tougher.

  • Custom User Avatar

    Not applicable as this is a 7kyu kata ^^

  • Custom User Avatar

    Nobody's going to change a kata after so many completions.

  • Custom User Avatar

    Totally agree!!

  • Custom User Avatar

    There is a comment that says "return all primes less than x", but if x is a prime then it is a solution. Should it say "return all primes up to x" ?
    great kata btw!

  • Custom User Avatar

    Java:

    • method name should be lowercased
    • not enough tests (currently, it's ridiculous, actually...) => actually, sample tests and test cases are swapped... (who's the guy who approved this?!? x-/ )
    • needs random tests anyway...
  • Custom User Avatar

    "I would like to report a duplicate issue."

    Closing.

  • Custom User Avatar

    yes, any way to contribute and fix this problem ?

  • Custom User Avatar

    String is returned because the original kata version in clojure is returning a String

    Funny enough, the description only states that the value needs to be rounded to two decimals. Loophole, yay! So car :: Double -> Int -> Double should be an eligible type. The actual type is up to you (and the original author).

    Good point too, I'll give it a spin and add random tests - which the original kata is lacking too - need to go over the documentation though to find how to add them.

    Use QuickCheck. The codex contains some examples, but in this case \(Positive price) (Positive years) -> ... should be fine.

  • Custom User Avatar

    Thanks for taking the time to review:

    • Float should be enough to handle the value of a car. I'm not going to push back if you think car method needs to recieve a Double, although I don't think double precision is needed in this particular case.
    • String is returned because the original kata version in clojure is returning a String - which btw I don't particularly like - if is legit to change the haskell translation to return Float or Double I'd be more than eager to do implement the change.
    • Good catch! I overlooked the import of Test.QuickCheck, I'll remove it.
    • Good point too, I'll give it a spin and add random tests - which the original kata is lacking too - need to go over the documentation though to find how to add them.
  • Custom User Avatar
    • Why Float and not Double?
    • Why a String instead of Double?
    • the import of Test.QuickCheck is redundant, since you don't actually use QuickCheck
    • no random tests
  • Custom User Avatar

    Haskell translation kumited.

  • Custom User Avatar

    Test harness for haskelll has an issue as reported below.
    If there's a way to contribute code to have the issue fixed I don't mind helping to have it fixed.

  • Custom User Avatar

    Thanks for the link!

  • Loading more items...