Ad
  • Default User Avatar

    Thank you! Its training. I try to make code document itself. Thats why I love Lua :D
    (eventhough sometimes I overdo it... see the Interpreter kata)

  • Default User Avatar

    You should replace arr = reducepairs(arr) to return reducepairs(arr).

    This way you would get a tail-call and avoid stack overflows.

    If no move is found it will return arr anyway and the call is already there.