Ad
  • Custom User Avatar

    Yeah thats the way I figured it out too, but I was a little perplexed at first trying to match the numbers with the descriptors. Anyway, thanks for taking my suggestions into consideration !

  • Custom User Avatar

    As far as the instructions go, you state that it start from the "From" number, add with the "Step" until the "To" number, which leaves the impression that generator takes the numbers in that chronological order.
    Now if we look at your example
    generator 10 20 10 = [10, 20] -- "From" = 10, "Step" = 10, "To" = 20 it makes no sense, as the step is clearly 10 and the To is 20, so the correct order would be From, To, Step.
    The same goes for your third example: If "To" bigger than "From", the output array should be written in reverse order: generator 20 10 2 = [20, 18, 16, 14, 12, 10] In general To should always be bigger than From, I'm sure you meant if From is bigger than To. Other than that, great kata and thanks for your work!