3 ms·
> Is it internally rewriting to a loop Yes. You add a `tailrec` modifier to your function. The compiler then checks if the last op in the function is a call to
by calcifer 9y ago
> Is it internally rewriting to a loop
Yes. You add a `tailrec` modifier to your function. The compiler then checks if the last op in the function is a call to itself. If it is, it gets replaced with a loop. If not, you get a warning that `tailrec` is ignored.