JP
05/25/2020, 10:48 AMraulraja
05/25/2020, 11:50 AMJP
05/25/2020, 1:05 PMjulian
05/25/2020, 4:26 PMJP
05/25/2020, 5:14 PMjulian
05/25/2020, 5:24 PMtailrec
keyword to the function and see whether the compiler recognizes your implementation as being tail-recursive. I don't know if all recursion can be converted to tail-recursion, but all the cases I've encountered have been convertible. Though it always involves some refactoring of the function itself, sometimes extensively. Yes, tail-recursion can be achieved without continuation passing. But there may be a subset of cases where continuation passing is required or preferred.julian
05/25/2020, 5:27 PMJP
05/26/2020, 11:12 AM