Ad
  • Custom User Avatar

    Rule number 1 it must erase all characters except +-<>,.[].

  • Custom User Avatar

    I'm having an issue in the last performance test. It says "The translation was failed. - Expected: true, instead got: false" and the input it's "[[>?-+<]]..." repeated many times. What would be the expected output in this case? My solution is outputting the following:

    if (*p) do {
      if (*p) do {
        p += 1;
        *p -= 1;
        *p += 1;
        p -= 1;
      } while (*p);
    } while (*p);
    ...
    

    Not sure what I'm missing here.

  • Custom User Avatar
  • Custom User Avatar

    Originally this was devised for Haskell. In haskell this exercise not just makes sense, but it exposes one of the core features of Haskell, namely lazy evaluation. In javascript, I think this is a "can be done", but not easily or neatly and the usefulness is more debatable. Don't worry about it too much if you are coming from Javascript.

    If you still want to understand what this is about: generate gives something, that represents an infinte 2D lattice.Lazyness comes in handy in representing infinte sctructures..
    You have to find a particular point on the lattice (grid/mesh whatever you want to call it), but while you are searching, you have to make sure you don't fall into infinite loops. For instance you can't just check the first row first, as if it doesn't contain the point then you never finish.

  • Custom User Avatar

    Guys sorry about my ignorance but I couldn't understand this kata. I'm trying to solve it using javascript. Can you explain it a bit more please?

  • Custom User Avatar
  • Custom User Avatar

    Upon going through this discussion, the following instructions may help in solving the kata:

    "Find the greatest difference in length for any possible pairing of strings between Array1 and Array2".

  • Custom User Avatar

    The instructions are awful