Ad
  • Custom User Avatar

    Hi,

    Duplicate, as pointed below. @evanrh: do not close the issue, it's aslo a general flag and has meaning outside of the scope of your kata itself.

    also, for further use (on different kind of tasks ;) ):

    • try to not test some requirements only in the full test suite. Here: no example test with the index
    • if you try to mimic the original, why no tests on the array parameter?
    • note that mimicking builtins generally results in kata of very low interest.
    • the random tests are rather bad, for several reasons:
      • reduce is not tested
      • the callbacks are fixed
      • only 1 single random test
      • the size of the input arrays is fixed
    • the mutation tests:
      • they are in the random test section => have nothing to do here
      • they are not testing that the input has not been mutated, but that the output is different from the input

    Cheers

  • Custom User Avatar

    should provide the index to the callback function

    Could you elaborate further on this point? I don't understand what the kata is asking me to do (should I pass the index to the function as a parameter or...?)