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.
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.
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.
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.