Ad
  • Custom User Avatar

    I don't know if it would add any value, but if you say it should only work for numbers n <= 40, should there be a test case to assert something along the lines of "does not attempt to find smallest(41)".

    It's nice to have a solution that can go higher, but if I assume there's some reason I shouldn't execute these operations on n > 40, then maybe my code should enforce that. I half expected to see that sort of test case when I started the kata. Whatcha think?

  • Custom User Avatar

    I don't know if it would add any value, but if you say it should only work for numbers n <= 40, should there be a test case to assert something along the lines of "does not attempt to find smallest(41)".

    It's nice to have a solution that can go higher, but if I assume there's some reason I shouldn't execute these operations on n > 40, then maybe my code should enforce that. I half expected to see that sort of test case when I started the kata.

    • Edit: Sorry, I meant for this to be a top level comment.
  • Custom User Avatar

    You don't need to pass a block in... I mean that the ampersand is not necessary.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution