Ad
  • Custom User Avatar

    In Clojure, the sample tests run fine. But every random test throws an error: java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IPersistentVector.

    Running locally and passing some random tests as sample the expected results come out.

  • Custom User Avatar

    I solved the kata in a couple of languages and Clojure indeed seems to be an outlier in a way that its interface does not conform to remaining languages (it's missing the third argument), and reference solution seems to not conform to the statement of the problem.

    I can try and fix the Clojure translation to work the same way as the rest of languages, but I do not know when, and until then I would consider the kata broken :(

  • Custom User Avatar

    I'm having trouble completing this KATA in Clojure. The description says a third argument will be passed with the name of the first attacker, but the argument is not present.

    I assumed Fighter 1 will aways attack first, but several random tests fail. The same happens if I default Fighter 2 to attack first.

  • Custom User Avatar

    One liners may look impressive but they often aren't easily readable. My solution is identical to this one, except I assigned a couple variables to make it more easily understandable.

    Also, there is no point on counting the length of digits for every digit.