Tail Recursive function for the sum of fractions
|Added at||2016-12-29 16:12|
I am trying to convert this recursive function into a tail recursive function
I thought that this solution would work but when it runs it just returns 1.0
I think this is because the accumulator is not being updated correctly but I don't understand why. The code is in Scala but an example in any language would be helpful.