Ad
  • Custom User Avatar

    Either remove reduce from Array.prototype, or check whether foldl is actually used in sum, join, …. Also, the recursive variants aren't mentioned in the description. You should also check whether they're actually recursive.

  • Default User Avatar

    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?

  • Custom User Avatar

    Description is too short.
    Please provide test cases.