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.
Don't forget the spoiler flag.
The solution was submitted in a different version of
Nodev8 (if you compare to Chrome), where it worked.Neither can I. Which led me to the conclusion that this solution is incorrect.
This comment is hidden because it contains spoiler information about the solution
@kostia
has not been seen lately, so will not be supporting his translation.If this code is useful, fork the translation and take it from there.
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)foldr
and(:)
are often better thanfoldl
and(++)
.For the rest, pointfree.io :D
This is far above my haskell skills level :) Nicely done!
How does this even work!? I accidentally came to the same answer!
This can't flip the array on the browser
cord length>28? why?
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
:)