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.
Approved
4 years later, Node 18. is the one and only default version, closing this one
OP solved it, closing
Dart translation ready for review! Feedback would be welcome so that I can correct any issues the translation may have!
Lua translation ready for review! Please feel free to review it and tell me if anything is wrong or can be improved.
i did it with a global variable lol
recursion and closures.
any hints? Rather not look up the answer
My code works for me but doesnt works here except 1st test
The description should state that all strings should be deleted from stack once a sentence has been returned.
Otherwise, that's a funny kata!
Thank you very much for those quick and detailed explanations. Though I could not have yet a code working after a few other trials (I get other errors...), I guess it'll help me to eventually get it. For now I've switched to other katas, I'll come back to this one later.
It can be easier to understand (does not have to be) if you break down this long expression into shorter expressions. For example,
msg = f(arg1)(arg2)()
can be broken into:and now it is (hopefully) easier to see that
f
has to be a function, which, when called witharg1
, has to returnf1
which in turn is... also a function, because it has to be possible to call it witharg2
, and such call has to return... also a function (f2
), which, when called without any param would return a string. Heck,f
,f1
,f2
can even be one and the same function.So one challenging part of this task is figuring out that your function(s) have to return other function(s). And with Python (or JS, or some other languages) it's quite easy.
Now the question is: what to put inside of such function(s)?
This comment is hidden because it contains spoiler information about the solution
changed it, but still.
Indeed this kata has some problems when run with Node 10, but I encountered no problems when I changed runtime to Node 8.
Loading more items...