3 ms·
Right, I completely see how that would prevent it from qualifying as a tail call, my misunderstanding was still different though. For some reason I thought that
by nxn 15y ago
Right, I completely see how that would prevent it from qualifying as a tail call, my misunderstanding was still different though. For some reason I thought that even if the recursive function was defined within the try-catch block (as below) it would prevent it from using a tail call:
try
let rec func ... =
...
func( ... )
let result = func( ... )
with
| ex -> ...
I don't know exactly how I ended up thinking that, seems a bit silly in retrospect.