• Very nice Kata, good description and environment, but the tests are not enough.
    There should be test which states that "x - y - z + 1" and "x - y - ( z + 1 )" must have different solutions.
    ATM (Java)-solutions are accepted which give for both expression the same result.

  • As a non native english speaker, i would like to have an reminder says that int == str in structure level.

  • This comment is hidden because it contains spoiler information about the solution

  • Tests should use test.assertEquals instead of test.expect.

  • This comment is hidden because it contains spoiler information about the solution

  • C translation (author inactive)

  • Random tests appear to be broken for Haskell. I submitted two times and got something like "123456789" (nine digits) should result in True but got False (which is an incorrect statement, since 9-digits doesn't make a valid ISBN). I submitted the third time, without any changes, and it passed.

  • In Go tests expect 'x' lowercase to be a valid character (for 'X'), unlike stated in the description and in (at least) Python, Ruby and JS.

  • Thanks for the kata, I'd like to leave a bunch of suggestions:

    • Please add more tests to the basic suite, I ended up outputting calls and arguments to console just to figure out the required use cases
    • Adding more accurate/expansive desriptions for tests and detailed test fail messages would also help greatly
    • I found 'find' description somewhat ambiguous - spec says it returns the function that would have been called first on dispatch, which might as well be a 'before' function
    • I'd suggest to stress in the description that 'find' is supposed to return a command that will execute the entire chain, as opposed to just the first function - it is evident from some of the use cases in the description but I was misled by assuming too much from the function name I guess
    • No random tests in Go
  • I think, there should be test like that one:
    [1].sameStructureAs([[1]]) // false
    It's possible to pass a solution that doesn't cover such conditions.

  • This comment is hidden because it contains spoiler information about the solution

  • Code for AST, BinOp and UnOp could be put with the simulator code-I guess its more of a convenience thing.

    public abstract class Ast {
        public abstract String op();
    public class BinOp extends Ast {
        private String n;
        private Ast a;
        private Ast b;
        public BinOp(String pop, Ast pop0, Ast pop1) {
            this.n = pop;
            this.a = pop0;
            this.b = pop1;
        public String toString() {
            return String.format("new BinOp(%s, %s, %s)", n, a, b);
        public String op() {
            return n;
        public Ast a() {
            return a;
        public Ast b() {
            return b;
    public class UnOp extends Ast {
        private String imm;
        private int val;
        public UnOp(String imm, int v) {
            this.imm = imm;
            this.val = v;
        public String toString() {
            return String.format("new UnOp(%s, %d)", imm, val);
        public String op() {
            return imm;
        public int n() {
            return val;
  • this should be included in the tests:

    test.describe("Sample Tests")

    abc = make_looper("abc")
    abc2 = make_looper("abc")

    test.assert_equals(abc(), 'a')
    test.assert_equals(abc2(), 'a')
    test.assert_equals(abc(), 'b')
    test.assert_equals(abc2(), 'b')

  • Loading more items...