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.
I can't really reconcile wanting to avoid nested functions with what you did with NFEs and IIFEs.
That comment wasn't directed at you but at the person that voted this
Best Practice
. ( I sincerely hope that wasn't you. )I actually like some of what you're doing, though un- and restructuring
arr
beforemap
is quite unnecessary, renaminglength
tonotEmpty
is as well, and I can only hope Node is smart enough to reuse tails in `([a,...arr]).that is typeScript.
The program uses flow (type checker) to write it.
to replicate it (Im assuming that is your question).
kindly switch to Babel and then type comment
@flow
and then follow up with your code.Hope that helps.
For information on flow see : https://flow.org/
You tried to create some array of millions of elements or something like that (possibly infinite loop).
Oh you know, ... yet another cheating.