Ad
  • Custom User Avatar

    Hi! I've started with forking the JS translation to make the unit tests more granular and to offer fibS / primeS tests to the user to see.

    So the changes are intended to be only in the test suits (the "sample" and real are equal — imho, in this kata a participant should see all the tests that are run on their code)

    While forking I got some conflict in the description — not sure how that happened. I got them from the very fact of forking.

  • Custom User Avatar

    "#{ VALUE } Chinese Yuan" — is effectively equal to VALUE + " Chinese Yuan"
    "%0.2f" % VALUE — here % is a method on String instances, it formats given VALUE using this string
    (in this case 0.2f formats a number, result of usd * 6.75 expression, with precision of two digits after the dot)

  • Custom User Avatar

    This is far above my haskell skills level :) Nicely done!

  • Custom User Avatar

    Thanks for the kata!
    Two minor things:

    1 One of the tests for knightEngine is checking if bind was called -- will fail if one would define a "bound" version of moveKnight before. e.g.

    var boundMoveKnight = bind(moveKnight);
    function knightEngine(from, movements){
     // ...
     boundMoveKnight(...)
     // ...
    }
    

    2 The bind function is being redefined in tests, which will fail if bind was defined as const. e.g.

    const bind = f => ...;
    

    (though I understand that this kata was written in days of es5 standard)

  • Custom User Avatar

    turns out: one can't write 16896 if-else statements -- node would throw with max call stack exceeded :)