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.
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.
"#{ VALUE } Chinese Yuan"
— is effectively equal toVALUE + " Chinese Yuan"
"%0.2f" % VALUE
— here%
is a method on String instances, it formats givenVALUE
using this string(in this case
0.2f
formats a number, result ofusd * 6.75
expression, with precision of two digits after the dot)This is far above my haskell skills level :) Nicely done!
Thanks for the kata!
Two minor things:
1 One of the tests for
knightEngine
is checking ifbind
was called -- will fail if one would define a "bound" version ofmoveKnight
before. e.g.2 The
bind
function is being redefined in tests, which will fail ifbind
was defined asconst
. e.g.(though I understand that this kata was written in days of es5 standard)
turns out: one can't write 16896 if-else statements -- node would throw with
max call stack exceeded
:)