Ad
  • Custom User Avatar

    It actually happens IRL. Sometimes I expand Array.prototype in a kata ( I miss concatMap ), and then the tests use a for .. in loop to iterate over some Array, and I get weird failures.

    Reminds me to expand prototypes the correct way ( and to bash the kata author for not using a for .. of loop :P ).

    Fire the assistent, know your programming language, and use a real one for rocket science ..

    Don't be Jeff. ( Don't be Jim either. )

  • Default User Avatar

    The creator of the kata figured that input of 0 should return 0... at least that's what I think is happening here. My code worked in tests, but failed on submission until I removed the handling of n == 0. Is a lone zero considered "trailing?" I could not find a definitive answer, so I agree that a single zero should be counted as 1.