Ad
  • Default User Avatar

    I agree with you, but I guess it's clearer than a tail-recursive solution, because I can only think of an additional function with an accumulator parameter for the list of digits to make it tail-recursive :)

  • Default User Avatar

    Just a question as a noob functional programmer: wouldn't this be very inefficient even on a funtional language since it is not tail-recursive?