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.
Either remove
reduce
fromArray.prototype
, or check whetherfoldl
is actually used insum
,join
, …. Also, the recursive variants aren't mentioned in the description. You should also check whether they're actually recursive.Description definitely needs more, uhm, description.
You should move explanation from comments in code to description. Especially examples.
You should explain better meaning of init parameter and behaviour in some edge cases like single-value or empty array.
What is the difference between sum and sumRec? Is 'Resursive' meant to be 'Recursive'? What does it have to do with foldl? Anyway even if there should be difference tests don't seem to test it - i simply copied body of sum to sumRec and it passed all tests.
Last test is confusing, if it fails it says that it test join of [3,5] and somehow expect ''. Actually it tests empty array so expected result is correct, but I had to console.log arguments to find it.
And a little suggestion - if you say that foldl is quit__e__(please fix this misspell too) similar to Array.prototype.reduce, maybe you should define it same way - Array.prototype.foldl?
Description is too short.
Please provide test cases.